Hi there,
I'm currently getting this error
My Code causing this is
If I had no data matching the criteria it would simply load up an empty report, once I have data matching the criteria it brings up this error.
repStr works out as
Thanks Guys
Edit: Just incase it's important, the report opens just fine if opened manually.
I'm currently getting this error
Code:
Run-time error '3464'
Data type mismatch in criteria expression
My Code causing this is
Code:
Private Sub Label35_Click()
Dim Weekno As String
Dim repStr As String
Weekno = InputBox("For Week Number...", "Enter Week Number")
repStr = "[Companies_CompanyID] = " & Me.CompanyID _
& " and [Complete] = Yes" & " and [WeekNumber] = " & Weekno
Debug.Print repStr
DoCmd.OpenReport "Invoice", acViewPreview, , repStr 'This Line
End Sub
If I had no data matching the criteria it would simply load up an empty report, once I have data matching the criteria it brings up this error.
repStr works out as
Code:
[Companies_CompanyID] = 1 and [Complete] = Yes and [WeekNumber] = 30
Thanks Guys

Edit: Just incase it's important, the report opens just fine if opened manually.
Last edited: