I have to post this because it is: (1) Driving me INSANE
and (2) I can't for the life of me figure out what is going wrong so here goes....
I have an unbound form that, at runtime, is given a recordsource of 1 of 2 queries depending on the users selection on the previous form through the double-click event of a listbox with this snippet of code:
[Forms]![frmVac_Log].RecordSource = "qryVac_Log"
Simple enough and everything works great.
Now - what I want to do is hide or display a few controls on the form depending on a selection in the form with a simple If-Then-Else statement like this example:
If (This field) = 1 then
'Display this control
'Display that control
Very, very simplified HOWEVER When I put this If-Then statement in ANY Event Procedure (On Open, Current, Activate, Load,etc...) It errors and gives this message:
Runtime Error '2424'
The expression you entered has a field, control, or property that Microsoft Access can't find
And it highlights the first line in the if-then code
Everything is spelled correctly and the references are set right - no spelling errors or nothing...
Anyone have any ideas why this is happening?