S
Steve S
What seemed to be a fairly straight forward if-then-else has really got me
down in the dirt. If 1303 = 1303 going into the if-then-else why is it true
if testing for 1303 <> 1303 ???
the code is:
Debug.Print Nz(DLookup("Judge", "qryMaxJudges", "Judge=" & Me.ComboJudges),
0) & " = " & Me.Combo_Judges
displays: 1303 = 1303
MsgBox Nz(DLookup("Judge", "qryMaxJudges", "Judge=" & Me.ComboJudges), 0) &
" = " & Me.ComboJudges
displays: 1303 = 1303
But then the test indicates that is not true
If Nz(DLookup("Judge", "qrymaxjudges", "Judge=" & Me.ComboJudges), 0) <>
Me.Combo_Judges Then
MsgBox Nz(DLookup("Judge", "qrymaxjudges", "Judge=" & Me.ComboJudges), 0) &
" <> " & Me.ComboJudges
displays: 1303 <> 1303
Debug.Print Nz(DLookup("Judge", "qrymaxjudges", "Judge=" & Me.ComboJudges),
0) & " <> " & Me.ComboJudges
displays: 1303 <> 1303
Exit Sub
End If
Any and all help is appreciated.
down in the dirt. If 1303 = 1303 going into the if-then-else why is it true
if testing for 1303 <> 1303 ???
the code is:
Debug.Print Nz(DLookup("Judge", "qryMaxJudges", "Judge=" & Me.ComboJudges),
0) & " = " & Me.Combo_Judges
displays: 1303 = 1303
MsgBox Nz(DLookup("Judge", "qryMaxJudges", "Judge=" & Me.ComboJudges), 0) &
" = " & Me.ComboJudges
displays: 1303 = 1303
But then the test indicates that is not true
If Nz(DLookup("Judge", "qrymaxjudges", "Judge=" & Me.ComboJudges), 0) <>
Me.Combo_Judges Then
MsgBox Nz(DLookup("Judge", "qrymaxjudges", "Judge=" & Me.ComboJudges), 0) &
" <> " & Me.ComboJudges
displays: 1303 <> 1303
Debug.Print Nz(DLookup("Judge", "qrymaxjudges", "Judge=" & Me.ComboJudges),
0) & " <> " & Me.ComboJudges
displays: 1303 <> 1303
Exit Sub
End If
Any and all help is appreciated.