If statements and variables in the true/false section

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I have a form that has a direct like to a table for the
forms control box. On the form I need to place text boxes
that display a field from the table based on a true/false
condition. Is there a way to accomplish this using an if
statement and how can this be done. I have attempted this
and I continually get the #error meesage displaying in the
box. It will not display the field information from the
table. I am out of ideas
 
Ron,

There are certainly ways to do this, although they do involve a little VBA
coding usually.

If you are getting that type #error I am thinking that you are probably
trying to put the IF statement into the ControlSource of those controls.
That won't work.

Usually what is done is to put Code into the OnCurrent event of the form so
that as you move to a new record you can test the condition of the
True/False and either hide or display the controls in question.

If you post back with more details and example scenarios of what you are
trying to do, complete with control names, we can probably provide you with
the code to do what you want.

Gary Miller
 
Back
Top