Very strange.....
I created a table and a form. On the form I added an unbound text box named "RClickSel". I added a button with the click event code of
Code:
Dim varTag As Variant
varTag = DLookup("DelTag", "tblDisplay", "LinkID = " & RClickSel)
Debug.Print varTag
I added a few records to the table, both true and false.
I entered a "LinkID" number (2) that had "DelTag" as false and clicked the button. 0 was returned.
I changed the text box "RClickSel" to 4 (a true value) and clicked the button. 0 was returned. (Hmmmm)
I changed "Dim varTag As Variant" to "Dim varTag As Boolean" and clicked the button. -1 was returned.
I changed the text box "RClickSel" to 2 (a false value) and clicked the button. 0 was returned.
I changed "Dim varTag As Boolean" back to "Dim varTag As Variant".
I set text box "RClickSel" to 2 (a false value) and clicked the button. 0 was returned.
I set text box "RClickSel" to 4 (a true value) and clicked the button. -1 was returned. (what????)
Deleted that dB and created another dB - set it up the same way..
Tried the same things.
But Debug.Print varTag prints the correct values now.
Don't know what to suggest now.......