hide error messages

  • Thread starter Thread starter angie
  • Start date Start date
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?
 
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
 
Back
Top