Unload Form (1 Viewer)

npierson

Registered User.
Local time
Today, 18:11
Joined
May 14, 2001
Messages
42
What is the code to unload a form?

Thanks,

Nick
 

npierson

Registered User.
Local time
Today, 18:11
Joined
May 14, 2001
Messages
42
I tried that and DoCmd.Close acForm, "Form Name" but none of these work.
 
R

Rich

Guest
You either have the form named incorrectly or are using the code in the wrong place, please be more specific on what you are trying to do.
 

npierson

Registered User.
Local time
Today, 18:11
Joined
May 14, 2001
Messages
42
After prompting for a password using a form, I would like to evaluate whether the password is valid (I know how to do this). If it is, I would like to load a certain form and make the password form dissappear, and if it is not, I would like to load a different form and have the current (password) form dissappear. So, basically all I need to know is how to close the form.

Thanks
 

Robert Dunstan

Mr Data
Local time
Today, 18:11
Joined
Jun 22, 2000
Messages
291
I'm assuming that in your password form the user has to click a button to evaluate the password. In the coding behind your command button if the password matches you need to add the line DoCmd.Close as stated by charityg. Omitting the form name argument means it should close the active object i.e. your password form.
 

npierson

Registered User.
Local time
Today, 18:11
Joined
May 14, 2001
Messages
42
I finally got it working. Thank you very much for the help everyone,

Nick
 

Users who are viewing this thread

Top Bottom