view a specific report based on the current info of a form

A

Arlene

Hi,

I have a form which has a subform, I added a command button on the subform
that will show a Report. But when I run a report it doesn't match the current
record on the form. How can I link the report's fields to the current record
show on the form?

I have to link several fields:

Tutor_ID
Effective_From
Effective_To
Area_Code

Thank you in advance for your help.
 
A

Arvin Meyer [MVP]

Save the record first, then open the report to that record:

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "your-report-name",,,"Tutor_ID=" & Me.Tudor_ID
 
A

Arlene

thank you very much, I have to do a little bit more .. but this helps. Thanks
again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top