Can the startup form be closed

S

Shreenivas Potnis

It seems 'UnLoad me' does not work. is it possible to
close a after it looses focus. How?
 
K

Ken Snell

Your question is a bit vague, but if I'm reading between the lines
correctly, your database has a startup form that is displayed and the user
does something on that form to move on to other actions.

If you have any controls on that startup form, then it doesn't actually have
a focus; the controls on the form can have the focus. A form gets focus only
if there are no controls on it that can receive the focus.

Second, Unload is a command for Userforms in VBA, but not ACCESS forms. In
ACCESS, you close a form this way:
DoCmd.Close acForm, "FormName"

Third, the easiest way to close a form is to use the code that runs when the
user clicks a button to go somewhere else. Insert the above line of code as
the last step in the code that is running in your startup form when the user
does something and you want the startup form to close.
 

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