I have a D Lookup, which works, if what I am looking up is in the first row, for some reason it won't go beyond. Can anyone help.
My code is
If 5 = DLookup("TabNo", "Running", 5) Then
DoCmd.RunMacro "Macro1"
Else
DoCmd.RunMacro "Start Table Macro"
End If
No it will look up 5 if 5 is in the top row but if it is in row 2 or onwards it won't look it up and moves onto the else part of the code.
My code is
If 5 = DLookup("TabNo", "Running", 5) Then
DoCmd.RunMacro "Macro1"
Else
DoCmd.RunMacro "Start Table Macro"
End If
No it will look up 5 if 5 is in the top row but if it is in row 2 or onwards it won't look it up and moves onto the else part of the code.