I have a report that I want to display all my radio traffic. I want to be
able to use a command button to open the report but have it specify the id
number of the record that I am in only to generate that information. Now I am
able to do this with opening a sub-form but I have not been successful with a
report....
Thanks in advance
Jen
Allen Browne - 21 Dec 2005 14:04 GMT
You can have the form open the report to just the record you are showing in
the form by using the WhereCondition of OpenReport.
Details in:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have a report that I want to display all my radio traffic. I want to be
> able to use a command button to open the report but have it specify the id
[quoted text clipped - 6 lines]
> Thanks in advance
> Jen
Rick Brandt - 21 Dec 2005 14:07 GMT
> I have a report that I want to display all my radio traffic. I want
> to be able to use a command button to open the report but have it
[quoted text clipped - 4 lines]
> Thanks in advance
> Jen
Look at the code that currently opens the report. It will be using
something like...
DoCmd.OpenReport "ReportName", acViewPreview
There is an optional WHERE argument you can add to this line that will
filter the report when opened.
DoCmd.OpenReport "ReportName", acViewPreview,, "ID = " & Me!ID

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com