hide error messages

A

angie

i have a text box that gets data from a multiselect textbox from my form and
it works fine. but when my form is closed (so there is no selection) i get
the error message "#name?". i want to use the conditional formatting to hide
it. is that possible?
 
J

John Spencer

I don't think it is possible with conditional formatting.

You could use a vba routine to check if the form is open and then show/hide
the control based on the form being open. In Access 2000 and later you can
try the following in the report's Load event. If it doesn't work there you
can try using it in the relevant section's format event.

If CurrentProject.AllForms("NameOfTheForm").IsLoaded Then
Me.SomeControlName.Visible = True
Else
Me.SomeControlName.Visible = False
End if

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top