Close a Form w/ Cmd Button

humphreya

New member
Local time
Today, 12:09
Joined
Dec 2, 2005
Messages
8
I am building a database to track employees. I have a form to input the personal information and want to close this form and open a new form to input the employee's training information. I have a cmd button to open the Training form for the individual, however I can not make it close the employee input form.

Can someone help with this?
 
After the line that opens the other form put:
DoCmd.Close acForm, Me.Name, acSaveNo
 
RG,

I have the same set up on my forms, however I just use this

Code:
DoCmd.Close acForm, "MyForm"

should I be using Me.MyForm instead of placing my form in ""?

Also, im assuming the acSaveNO is simply telling it to not save any changes made?

thanks

John D
 
Hi John,

My syntax is just more generic. Your syntax is just fine and specific to your form. The acSaveNO says do not save any changes made to the Form design and has nothing to do with data shown in the form.
 
Thanks, that help alot. Sorry I did not reply sooner, I only work on this db about once a week.
 
You are very welcome, glad I could help. Merry Christmas!
 

Users who are viewing this thread

Back
Top Bottom