I have two issues and hopefully you can help me out here. Basically I have a form (called MyForm1) connected to a table with some hundred records....
In MyForm1 there is a button (CmdButton1) with an onclick event attached. When CmdButton1 is clicked a macro is run (stored in Access' own macro module which will OpenReport and Close form). The macro will open MyReport1 (all data in MyReport1 come from a query) and close MyForm1.
In MyReport1 I have an OnClose event attached to the report which will OpenForm... In other words, when the report is closed the macro will go back to MyForm1.
My problem first issue is that I am always taken back to the first record in the form but I want to be taken back to the record from which I ran the report.
Secondly, today when CmdButton1 is clicked I have the query that is connected to MyReport1 ask the user for the ID of the record in the form. Is there anyway I can skip this step, meaning that when CmdButton1 is clicked, the query will "know" that the ID is should use is the one for the form record visible at the moment?
Any help here will be highly appreciated, particularly with the first issue...
Thanks in advance!
In MyForm1 there is a button (CmdButton1) with an onclick event attached. When CmdButton1 is clicked a macro is run (stored in Access' own macro module which will OpenReport and Close form). The macro will open MyReport1 (all data in MyReport1 come from a query) and close MyForm1.
In MyReport1 I have an OnClose event attached to the report which will OpenForm... In other words, when the report is closed the macro will go back to MyForm1.
My problem first issue is that I am always taken back to the first record in the form but I want to be taken back to the record from which I ran the report.
Secondly, today when CmdButton1 is clicked I have the query that is connected to MyReport1 ask the user for the ID of the record in the form. Is there anyway I can skip this step, meaning that when CmdButton1 is clicked, the query will "know" that the ID is should use is the one for the form record visible at the moment?
Any help here will be highly appreciated, particularly with the first issue...
Thanks in advance!