By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,705 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,705 IT Pros & Developers. It's quick & easy.

Creating report with current record only

P: n/a
I currently populate a form based on a query.

1)How do I create a report that displays only the current record's fields
and not all records in the table?

Thanks

Tim G
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Tim Graichen" <Tg*******@neo.rr.com> wrote in message
news:hJ*********************@twister.neo.rr.com...
I currently populate a form based on a query.

1)How do I create a report that displays only the current record's fields
and not all records in the table?


The command for opening a report...

DoCmd.OpenReport

....includes an optional WHERE argument. You need to construct an argument string
that filters the report to the record currently being displayed on the form. It will
look just a query WHERE clause without the word "WHERE".

Example assuming that the Primary Key is named [ID]...

DoCmd.OpenReport "YourReportName",,,"[ID] = " & Me![ID]
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.