Report's recordsource = form's recordsource

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!
 
D

Douglas J. Steele

Is the form open when you're attempting to run that code? And in which
report event have you placed that code?
 
J

Johnny Bright

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!
 
C

Chuck

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
--
 
D

Douglas J. Steele

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

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