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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where should I put code when closing tabbed sub form

Status
Not open for further replies.

NeilT123

Technical User
Jan 6, 2005
302
GB
Whilst researching another issue I came across this page which suggests that I should code in a save before closing forms


using
Code:
' Never use Close without explicitly saving the record first:
'    If Me.Dirty Then
'       Me.Dirty = False
'    End If
'    DoCmd.Close acForm, Me.Name

I have two forms which are quite complex and are main form then sub form then further tabbed sub form.

Is it OK to put the code in the close of the main form and it will catch all issues or do I need to add the code to each of the forms in the tabbed sub form?
 
It only needs to go in the Form that your are explicitly closing, which is to say the actual Form the Close button resides on.

The Missinglinq

Richmond, Virginia

The Devil's in the Details!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top