This is the code that runs when a button on form 1 is pressed to open form 2(form 2 is called Replacement Unit):
Private Sub Command80_Click()
On Error GoTo Err_Command80_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Replacement Unit"
stLinkCriteria = "[Repair No]=" & Me![REPAIR No]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command80_Click:
Exit Sub
Err_Command80_Click:
MsgBox Err.Description
Resume Exit_Command80_Click
End Sub
I want to save the changes to [form 1] before [Replacement Unit] opens. What and where do I enter code? Sorry, only just started to learn VB. (Using Acc97). Any help would be great!
Private Sub Command80_Click()
On Error GoTo Err_Command80_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Replacement Unit"
stLinkCriteria = "[Repair No]=" & Me![REPAIR No]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command80_Click:
Exit Sub
Err_Command80_Click:
MsgBox Err.Description
Resume Exit_Command80_Click
End Sub
I want to save the changes to [form 1] before [Replacement Unit] opens. What and where do I enter code? Sorry, only just started to learn VB. (Using Acc97). Any help would be great!