Hiding a form on startup

Eniac

Canadian Nerd
Local time
Today, 07:49
Joined
Jun 8, 2004
Messages
23
Hello,

first, I must apologize, I'm sure this topic has been covered in the past but wasn't able to find an answer using the search engine so I resorted to posting about it, forgive me if this topic already exist ... somewhere.... buried ... :rolleyes:

I'm building a BE/FE system.

one of the thing I want my FE to do is to open a form upon start up which fires up the logon screen and then hides itself to retain some information useful to other forms during the use of the application.

The most obvious thing to do is (it's what i did anyway) :

forms("frmhidUserInfo").visible = false

but as you guess, if I have to ask, its because it didn't work.

I also tried indirect methods such as using DoCmd.RunCommand adCmdHideWindow or DoCmd.RunMenuItem but neither of them worked.

The form is perfectly "hideable" when using the menu bar but I can't do it with VBA. I, of course, made sure the form isn't set as modal or popup.

Is there something I'm doing wrong (or not doing) ??

Thanks!
 
Use a macro called autoexec which opens the first form as hidden and the second being the logon.
 
thanks!

Hey, yer a king mile :D

Thanks for the tip, i knew it was simple, so simple I almost blushed when I saw it was an argument of the openform command.

though, im still surprised to see that the hidden/visible status can only be set upon opening the form.

Anyhow, problem solved!
 
Eniac said:
though, im still surprised to see that the hidden/visible status can only be set upon opening the form.
You can hide a form with
Code:
Me.Visible = False
When you can't get that working, in which event did you put that code?
 

Users who are viewing this thread

Back
Top Bottom