Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass variable between form and report (objects) 1

Status
Not open for further replies.

ponderdj

MIS
Dec 10, 2004
135
US
Hello,

I've been trying to read about variable scope, and have come to the conclusion that forms are objects and variables declared within them do not exist outside of them, i.e. on another form.

I'm trying to have a command button open a report, and on open set it's recordset equal to the form's recordset. I'm trying to do it by setting a varible to a DAO.Recordset in the form, then trying to set the report's recordset to that variable on open.

I've tried a couple of different ways of passing the variable from the form into a module and then back to the report with no luck.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top