Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data type mismatch in criteria expression error

Status
Not open for further replies.

ddevil

Technical User
Feb 14, 2006
49
US
I keep getting a data runtime error 3464 "data type mismatch in criteria expression" when clicking on the Print AP Report button. I'm just trying to print a report where the ParentChild field in the query (text field) matches the ChildParentValue field on the form (text field also). Any ideas why I'm getting this error? To I need to qualify as text even though the fields are text? If so, how do I do that?


Private Sub PrintAPReport_Click()

DoCmd.OpenReport "PaymentRequestReport", acViewPreview, , "ParentChild = " & ChildParentValue

Me.Printed = -1

End Sub

Thanks for your help!
 
Could try "ParentChild = '" & ChildParentValue & "'"

but ChildParentValue should be a number, not a string, right?


10 is company, 11 is a crowd
 
No, ChildParentValue should be a string and not a number. This worked perfectly, I can't seem to get the " ' right when I do this. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top