Code:
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Inv] = " & Me.[Inv]
DoCmd.OpenReport "Preprinted", acViewPreview, , strWhere
End If
End Sub
Private Sub Option143_Click()
End Sub
Code:
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Inv] = " & Me.[Inv]
DoCmd.OpenReport "Preprinted", acViewPreview, , strWhere
End If
End Sub
Private Sub Option143_Click()
End Sub
Is inv a primary key? also the last two lines need to be removed.