Report's recordsource = form's recordsource

  • Thread starter Thread starter Johnny Bright
  • Start date Start date
J

Johnny Bright

Hi there,

I'm trying to do the above in code.

I've tried this:
Me.RecordSource = Forms!frmOR.RecordSource
in the report's open event but I get parameter values popping up so it isn't
finding the form's recordsource.
How can I do this or can this even be done? Using Access XP.

Thanks to all!
 
Is the form open when you're attempting to run that code? And in which
report event have you placed that code?
 
Hi Doug,

Thanks for the reply Yes, the form is open. I am opening the report from a
button on my form and the event is in the report's open event.

Any ideas?

Thanks!
 
Hi there,

I'm trying to do the above in code.

I've tried this:
Me.RecordSource = Forms!frmOR.RecordSource
in the report's open event but I get parameter values popping up so it isn't
finding the form's recordsource.
How can I do this or can this even be done? Using Access XP.

Thanks to all!
Not nearly so neat as going from a form to a printed report, but it'll get the
job done.

If your form is getting its data from a table, change it so that it gets its
data from a query that in turn gets it data from the table.

Set the queries criteria to one or more of the text boxes in the form that
together will uniquely identify the record and filters out everything else.

Make a report that presents the data in the desired manner.

Place a command button in the form that opens the report.

Chuck
--
 
What is the recordsource of the form? Is it a parameter query that's looking
for values?
 
Back
Top