I did read previous posts on this topic in the forum and could not find exactly what I needed.
New to VB code - I want to put a command button on a form that prints the current record to an existing report. The current code prints all of the thousands of records in the database to my existing report.
Here is the current code:
Private Sub print_qt_notice_button_Click()
On Error GoTo Err_print_qt_notice_button_Click
Dim stDocName As String
stDocName = "Quarantine Notice"
DoCmd.OpenReport stDocName, acNormal
Exit_print_qt_notice_button_Click:
Exit Sub
Err_print_qt_notice_button_Click:
MsgBox Err.Description
Resume Exit_print_qt_notice_button_Click
End Sub
New to VB code - I want to put a command button on a form that prints the current record to an existing report. The current code prints all of the thousands of records in the database to my existing report.
Here is the current code:
Private Sub print_qt_notice_button_Click()
On Error GoTo Err_print_qt_notice_button_Click
Dim stDocName As String
stDocName = "Quarantine Notice"
DoCmd.OpenReport stDocName, acNormal
Exit_print_qt_notice_button_Click:
Exit Sub
Err_print_qt_notice_button_Click:
MsgBox Err.Description
Resume Exit_print_qt_notice_button_Click
End Sub