Problem filtering and opening a report

  • Thread starter Thread starter John F
  • Start date Start date
J

John F

I have a report based on a query that gives me all records and I would like
to use a form to filter the report and retrieve either a single record or a
group of records based upon which filter I apply.

On a form called RunReportsFiltered I have an unbound Combo Box called
[NameFilter]. It picks a persons name which is a calculated field in the
query called [CombinedName] which equals [LastName] & "," & [FirstName].

In the code I set SingleName = [NameFilter]
DoCmd.OpenReport "Complete Record", acViewPreview, "Report Query",
"CombinedName = " & SingleName

This gives me an Syntax error (comma) in query expression.

Need Help
Thanks
 
Data Pig is a great resource!! Take a look at this too:
http://www.fontstuff.com/access/acctut19.htm

Read the article and download the sample at the bottom of the page:
AccessAndSQL6_2000.zip [115KB]

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


orange via AccessMonster.com said:
John said:
I have a report based on a query that gives me all records and I would like
to use a form to filter the report and retrieve either a single record or a
group of records based upon which filter I apply.

On a form called RunReportsFiltered I have an unbound Combo Box called
[NameFilter]. It picks a persons name which is a calculated field in the
query called [CombinedName] which equals [LastName] & "," & [FirstName].

In the code I set SingleName = [NameFilter]
DoCmd.OpenReport "Complete Record", acViewPreview, "Report Query",
"CombinedName = " & SingleName

This gives me an Syntax error (comma) in query expression.

Need Help
Thanks
You may try http://www.fontstuff.com/access/acctut19.htm
or this video tutorial
http://www.datapigtechnologies.com/flashfiles/passparamtoreport.html

--
Message posted via AccessMonster.com


.
 
Back
Top