hidden form won't stay hidden

  • Thread starter Thread starter Bill Reed via AccessMonster.com
  • Start date Start date
B

Bill Reed via AccessMonster.com

I have a hidden form that opens on startup of the db. It runs code to set
the path in the titlebar, and it sets a filtered list as the datasource of
another form and the rowsource of a combobox on that form. The problem is,
although it's a hidden form, it refuses to stay hidden. After the db opens,
there's the hidden form right up front and center. Any suggestions? Why
does a hidden form display under any circumstances. Doesn't that defy the
definition of hidden?

Thanks,

Bill
 
Bill

How did you hide it?

What code do you have running? Any chance the form's Visible property is
being changed?

Good luck

Jeff Boyce
<Access MVP>
 
Thanks for responding.

I have it hidden in the database forms window by setting its properties to
Hidden. Forms don't have a .visible property, do they?

Bill
 
I have it hidden in the database forms window by setting its properties to
Hidden.
That's different, it just makes it a hidden object in the database window.

Forms don't have a .visible property, do they?
Yes, they do! You don't set it through form design, though, you need to
do so programatically. While in design view display the properties for
the Form object, so to tab Events, put the cursor in the On Open event,
click on the little button withthe ellipsis symbol on the right and
select Code Builder. You will be taken to a VBA screen, with the cursor
between these lines:

Private Sub Form_Open(Cancel As Integer)

End Sub

Paste this line of code in between:

Me.Visisble = false

Close to get back to the form and save. The job is done.

HTH,
Nikos
 
Back
Top