A abcd_2013 Registered User. Local time Yesterday, 16:45 Joined Dec 7, 2012 Messages 13 Jan 4, 2013 #1 is this condition equal each other is if here have the same way If Me.Text1 = 5 Then If Me.Text3 = 10 Then MsgBox "hi" End If End If ===== If Me.Text1 = 5 And Me.Text3 = 10 Then MsgBox "hi" End If
is this condition equal each other is if here have the same way If Me.Text1 = 5 Then If Me.Text3 = 10 Then MsgBox "hi" End If End If ===== If Me.Text1 = 5 And Me.Text3 = 10 Then MsgBox "hi" End If
B Big Pat Registered User. Local time Today, 00:45 Joined Sep 29, 2004 Messages 555 Jan 4, 2013 #2 I don't think the second way will work. You *might* be able to do something like IF AND(Me.Text1=5,Me.Text3=10) = True msgBox "Hi" but I have never tried it. But the first way looks right to me
I don't think the second way will work. You *might* be able to do something like IF AND(Me.Text1=5,Me.Text3=10) = True msgBox "Hi" but I have never tried it. But the first way looks right to me
Wiz47 Learning by inches ... Local time Yesterday, 19:45 Joined Nov 30, 2006 Messages 274 Jan 6, 2013 #3 abcd_2013 said: is this condition equal each other is if here have the same way If Me.Text1 = 5 Then If Me.Text3 = 10 Then MsgBox "hi" Else MsgBox "bye" End If End If Click to expand... You might also consider an else statement in case the values do not equal the ones indicated. The else statement would tell the program what to do if the conditions aren't met.
abcd_2013 said: is this condition equal each other is if here have the same way If Me.Text1 = 5 Then If Me.Text3 = 10 Then MsgBox "hi" Else MsgBox "bye" End If End If Click to expand... You might also consider an else statement in case the values do not equal the ones indicated. The else statement would tell the program what to do if the conditions aren't met.
G Galaxiom Super Moderator Staff member Local time Today, 09:45 Joined Jan 20, 2009 Messages 12,895 Jan 6, 2013 #4 The two structures are both valid and are equivalent.