Private Sub Preview_Report_Click()
Dim stDocName As String
Dim strWhere As String
stDocName = "Replacement Debit Card Transmittal to Unit"
strWhere = "[New Card Number]='" & Me![New Card Number] & "'"
DoCmd.OpenReport stDocName, acPreview, , strWhere
I'm using the above code to print the current record displayed in the form, the only problem is after filling out the fields in the form I have to press the next record button for the table to update and for the print button to work properly.
What code can I add to the print button so that as it's clicked on it updates the table before trying to do the print preview part.
Dim stDocName As String
Dim strWhere As String
stDocName = "Replacement Debit Card Transmittal to Unit"
strWhere = "[New Card Number]='" & Me![New Card Number] & "'"
DoCmd.OpenReport stDocName, acPreview, , strWhere
I'm using the above code to print the current record displayed in the form, the only problem is after filling out the fields in the form I have to press the next record button for the table to update and for the print button to work properly.
What code can I add to the print button so that as it's clicked on it updates the table before trying to do the print preview part.