Hi, I'm working on a database for my job and have a very limited understanding of code as I don't have much time to learn it in detail - I only need it for a few small things. Thus far I've been able to muddle my way through, but I'm stuck on trying to print off a specfic entry in a report. I found some threads on it but the code doesn't work. So basically I have client information on a form, and I want to be able to click a button and have it print the report on that specific record, not every one.
Here's the code I found online:
Dim strDocName As String
Dim strWhere As String
strDocName = "rptSomeReport"
strWhere = "[RunID]=" & me!RunID
DoCmd.OpenReport strDocName, acPreview, , strWhere
When I put my info in it looks like this:
Dim strDocName As String
Dim strWhere As String
strDocName = "Face Sheets"
strWhere = "[ETO Number]=" & me![ETO Number]
DoCmd.OpenReport strDocName, acPreview, , strWhere
When I try and run it I get "run-time error 3464, data type mismatch in criteria expression".
Any ideas?
Thanks
-H
Here's the code I found online:
Dim strDocName As String
Dim strWhere As String
strDocName = "rptSomeReport"
strWhere = "[RunID]=" & me!RunID
DoCmd.OpenReport strDocName, acPreview, , strWhere
When I put my info in it looks like this:
Dim strDocName As String
Dim strWhere As String
strDocName = "Face Sheets"
strWhere = "[ETO Number]=" & me![ETO Number]
DoCmd.OpenReport strDocName, acPreview, , strWhere
When I try and run it I get "run-time error 3464, data type mismatch in criteria expression".
Any ideas?
Thanks
-H