Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exit Command Button Not Saving

Status
Not open for further replies.

Spec01

IS-IT--Management
Jul 21, 2005
73
CA
When I click on the Exit Button that I placed in the Subform, it erases all of the information. But, when I enter the information a second time all the information stays.

This is very annoying because i have to enter all of the information twice before it saves itself. If someone knows any kind of solution for this problem please help.
 
1st Exit Button:
Private Sub Exit_Click()
On Error GoTo Err_Exit_Click


DoCmd.Close

Exit_Exit_Click:
Exit Sub

Err_Exit_Click:
MsgBox Err.Description
Resume Exit_Exit_Click

End Sub

2nd Exit Button:
Private Sub Exit_Form_Click()
On Error GoTo Err_Exit_Form_Click


DoCmd.Close

Exit_Exit_Form_Click:
Exit Sub

Err_Exit_Form_Click:
MsgBox Err.Description
Resume Exit_Exit_Form_Click

End Sub
 
I have 2 command buttons these go into linked forms. In each form is a Exit command button this is the code for both of the command buttons.
 
The code I am asking for is the code in the buttons on your main form that opens the extra forms.
 
Seems you haven't tried my suggestion in any of your exit button ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top