J
Joe Cilinceon
Here is what I have:
On a subform (Datasheet type) when I select a row I would like it to than
allow me to print a receipt. I've added a command button with the following
code:
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 = "[Transaction] = " & Me.[Transaction]
DoCmd.OpenReport "Payment Receipt", acViewPreview, , strWhere
End If
Once I hit the button I get a Runtime Error 2465 and "Can't find the Field
'|' Referred to in your field.
Any help would be greatly appreaciated
On a subform (Datasheet type) when I select a row I would like it to than
allow me to print a receipt. I've added a command button with the following
code:
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 = "[Transaction] = " & Me.[Transaction]
DoCmd.OpenReport "Payment Receipt", acViewPreview, , strWhere
End If
Once I hit the button I get a Runtime Error 2465 and "Can't find the Field
'|' Referred to in your field.
Any help would be greatly appreaciated