Print current record to a grouped report

R

Randy

I have am using Microsoft Access 97.

I have tried to run a vb code to do the above and could not get it too
work and I thought I would try some advise on using a macro as I am
more familiar with working with macros.

I have a Form that is the main db called Table 1. In that form is also
a subform named Table 2. I want to use a Report named Table1.

I want to print the current record that has data in the sub form Table
2.

Could someone please tell me how to print the report from the form for
the current record (table 2).

I have been able to get it to print but it prints out the grouped
report with all the records.

Please help me I have been working on this for about 4 days to try to
learn how to do this.
 
D

Donnie Keith via AccessMonster.com

Try this code in the on click procedure the SSN's represent my linked
fields between the form and subform. This also works for opening another
form in the database that has linked fields. I'm in the military so we use
SSN's (with permission IAW the Privacy Act of course....tends to be a
sensitive issue).

I use Me.Refresh prior to make sure that the current record is updated in
the report or form opens. Just copy and replace the SSN's with your linked
fields.

Me.Refresh
DoCmd.OpenReport "rptEnlistedRatingScheme", acViewPreview, , "[SSN]='" &
Me.SSN & "' "
 

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