From: Mike Painter on 9 Apr 2010 22:03 ANDRLIMO wrote: > Doug, > > Thank you very much that was the problem this is the first time i > have ever done an If statement and i am still in my infancy writing > code this was very helpful and helped correct the problem. Again > thanks for the help. > > Andrew I've never liked ELSE IF AND find CASE a much clearer method.
From: ruralguy via AccessMonster.com on 12 Apr 2010 11:37 What is the FieldType to which the two controls are bound? Have you tried numeric -1 for yes and 0 for no? ANDRLIMO wrote: >I am having a problem with the code that i have written. I can get the last >elseif statement to work but the if and first elseif doesnt want to work >correctly. Below is the code that i used, and any help with this would be >greatly appreciated. > >Private Sub Command41_Click() > If Me.APPROVED = "yes" And Me.DISAPPROVED = "0" Then > DoCmd.OpenReport "rptdd1970", acViewPreview > ElseIf Me.APPROVED = "0" And Me.DISAPPROVED = "yes" Then > intanswer = MsgBox("Your request was disapproved.", vbOKOnly) > ElseIf Me.APPROVED = "0" And Me.DISAPPROVED = "0" Then > intanswer = MsgBox("Your request hasn't been reviewed yet.", >vbokayonly) > End If >End Sub > >Thanks, > >Andrew -- RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201004/1
First
|
Prev
|
Pages: 1 2 Prev: PLEASE HELP: Reload a subform with updated columns Next: Counting Weekdays in the Future |