R
Robert
Sirs,
I have a button to call a report preview for a worksheet report which
is named worksheet_report. It works fine on the main form. I need to
move this button to a sub form which is named menu-9.
Private Sub Command2_Click()
Dim stDocName As String
Dim strWhere As String
If Me.NewRecord Then
MsgBox "Select a record to print"
Else
stDocName = "worksheet_report"
strWhere = "[ID]=" & Me![ID]
DoCmd.OpenReport stDocName, acPreview, , strWhere
End If
End Sub
This code is for the worksheet report button on the main form. What do
I need to change to get it to work on the sub menu form?
I have a button to call a report preview for a worksheet report which
is named worksheet_report. It works fine on the main form. I need to
move this button to a sub form which is named menu-9.
Private Sub Command2_Click()
Dim stDocName As String
Dim strWhere As String
If Me.NewRecord Then
MsgBox "Select a record to print"
Else
stDocName = "worksheet_report"
strWhere = "[ID]=" & Me![ID]
DoCmd.OpenReport stDocName, acPreview, , strWhere
End If
End Sub
This code is for the worksheet report button on the main form. What do
I need to change to get it to work on the sub menu form?