davesmith202
Employee of Access World
- Local time
- Today, 22:22
- Joined
- Jul 20, 2001
- Messages
- 522
I have a continuous Form and a label field to the right of the last field. When I click this label, I want it to run some code to trigger a msgbox. My code is below.
But when I click the label field on any row, it will always popup the msgbox with "abc". Why is that?
Thanks,
Jon
Code:
Dim txtAdvice As String
txtAdvice = ""
If (Me.field1= "abc") And (Me.field2= "No") Then
txtAdvice = "xyz."
Else
txtAdvice = "123"
End If
MsgBox txtAdvice
But when I click the label field on any row, it will always popup the msgbox with "abc". Why is that?
Thanks,
Jon