Hi,
I'm a DB newbie and I've been having issues trying to print the record
I am viewing in a form to a report. I have looked in groups all over
and they all say to try basically the same thing but I can't get it to
work.
This is the latest code I've tried:
Private Sub NewRepairPrintPreview_Click()
If Me.Dirty Then
Me.Dirty = False
End If
Dim strReportName As String
strReportName = "Print New Repair"
Dim strCriteria As String
If Me.NewRecord Then
MsgBox "There is no record to print..."
Else
strCriteria = "[Cust#] = " & Me.[Cust#]
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End If
End Sub
Using Access2000, the form is filtered to show only one record. When I
click the command button it comes up with the message box Enter
Parameter Value for Cust#, which I enter, but the report still shows
all of the records.
The report is currently sourced from the table, but when it was from a
query that didn't make any difference either.
Does anyone know what I'm doing wrong??