G
Guest
I have a form that has two primary keys: DateDraw and PhlebName.
I want to print the form to a report and am using the following code:
Private Sub Command10_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 = "[DrawDate] = " & Me.[DrawDate]
DoCmd.OpenReport "Print Current Report", acViewPreview, ,
strWhere
End If
End Sub
I keep getting a data mismatch error (DrawDate is a Date/Time datatype and
PhlebName is a text type). Could someone point me in the right direction??
Thanks
I want to print the form to a report and am using the following code:
Private Sub Command10_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 = "[DrawDate] = " & Me.[DrawDate]
DoCmd.OpenReport "Print Current Report", acViewPreview, ,
strWhere
End If
End Sub
I keep getting a data mismatch error (DrawDate is a Date/Time datatype and
PhlebName is a text type). Could someone point me in the right direction??
Thanks