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