I have a form with a 'Print' command button and another button called 'Save and New'. The way the form is used is as follows:
1. Data is entered into the form.
2. Form is printed with the 'Print' button.
3. The data is written and advanced to the next record with the 'Save and New' button.
4. Next round of data is entered and the process is repeated.
The issue I have is that when the 'Print' button is pressed to print the second round of data, I get the 1st data entered AND the second. If the process is repeated again, I get 3 items printed out.
Command button:
Private Sub bPrintForm_Click()
On Error GoTo Err_Print_Click
DoCmd.RunCommand acCmdPrint
Exit_bPrintForm_Click:
Exit Sub
Err_Print_Click:
MsgBox Err.Description
MsgBox "You MUST enter all required Data Highlighted in Yellow"
Resume Exit_bPrintForm_Click
End Sub
Save and New button:
Private Sub bSave_n_New_Click()
On Error GoTo Err_bSave_n_New_Click
DoCmd.GoToRecord , , acNext
Exit_bSave_n_New_Click:
Exit Sub
Err_bSave_n_New_Click:
MsgBox Err.Description
MsgBox "You MUST enter all required Data Highlighted in Yellow"
Resume Exit_bSave_n_New_Click
End Sub
Thanks for any help and suggestions.
1. Data is entered into the form.
2. Form is printed with the 'Print' button.
3. The data is written and advanced to the next record with the 'Save and New' button.
4. Next round of data is entered and the process is repeated.
The issue I have is that when the 'Print' button is pressed to print the second round of data, I get the 1st data entered AND the second. If the process is repeated again, I get 3 items printed out.
Command button:
Private Sub bPrintForm_Click()
On Error GoTo Err_Print_Click
DoCmd.RunCommand acCmdPrint
Exit_bPrintForm_Click:
Exit Sub
Err_Print_Click:
MsgBox Err.Description
MsgBox "You MUST enter all required Data Highlighted in Yellow"
Resume Exit_bPrintForm_Click
End Sub
Save and New button:
Private Sub bSave_n_New_Click()
On Error GoTo Err_bSave_n_New_Click
DoCmd.GoToRecord , , acNext
Exit_bSave_n_New_Click:
Exit Sub
Err_bSave_n_New_Click:
MsgBox Err.Description
MsgBox "You MUST enter all required Data Highlighted in Yellow"
Resume Exit_bSave_n_New_Click
End Sub
Thanks for any help and suggestions.