Printing current record on form

G

Guest

(I sent this earlier in a completely different format but I did not see it
appear after 1.5 hours so I am resending it)

I can print the current record from the form I am looking at but it only
prints the first valid record of the subforms that have a many-to-one
relationship with its parents. I can 'scroll' through the subforms to the
data I want but I can not figure out how to pass the 'current' subforms data
to the report.

More detail:
Main form: BusinessForm
Subform: BusinessLocationSubform
Sub-subform: PersonForm

I want to combine the 'CompanyName' found in BusinessForm with the
'Lastname' found in the PersonForm to print out a specified report. The
'where' syntax would be greatly appreciated.

Thanks in advance....Ellie
 
L

Larry Daugherty

If you have things working to the point where your Report prints the
current record you're on the way. Change the query on which the
Report is based to include the table from the "many" side. The "one"
side is already limited to the current record so by including the
other table in the query you should get all of the "many" side records
associated with just the current record. Try running the query and
see that you get as many records in the query as you did on the
subform. While you're working on the query in design view you may
need to limit the query to the record under scrutiny by writing its ID
into its criteria line.


The fact that you say you already get the first "many" side record
implies that you have already included the table in the query but that
your Report design needs some work. Be sure the detail section where
you show the sub-records can grow and shrink.

HTH
 

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