I have a data Entry form that enters information into many different tables. This works fine.
To save and exit the form I have a save button with the following code connected onClick:
This saves the data that has been entered on the form, closes it and takes the user back the main menu.
I have a Query that looks up the last added relevant information from the different tables, in order to compile a report. This also works fine.
However when I get the report to automatically print out when they save the data
The information it prints out however is from the previous input. (IE I have entered the information for ID = 5 but it prints out the data for ID = 4) However if I then load up the report manually it shows the correct data.
Therefore I’m assuming that I need to save the data, and get the form to refesh the database in order to get the correct information. Anyone got any brain waves on how i would do this?
Cheers
Michael
To save and exit the form I have a save button with the following code connected onClick:
Code:
MsgBox "Please Collect The Print Out"
DoCmd.Close
DoCmd.OpenForm ("Main Menu")
This saves the data that has been entered on the form, closes it and takes the user back the main menu.
I have a Query that looks up the last added relevant information from the different tables, in order to compile a report. This also works fine.
However when I get the report to automatically print out when they save the data
Code:
MsgBox "Please Collect The Print Out"
DoCmd.Close
DoCmd.OpenForm ("Main Menu")
[i]DoCmd.OpenReport ("Book Out Print Out")[/i]
The information it prints out however is from the previous input. (IE I have entered the information for ID = 5 but it prints out the data for ID = 4) However if I then load up the report manually it shows the correct data.
Therefore I’m assuming that I need to save the data, and get the form to refesh the database in order to get the correct information. Anyone got any brain waves on how i would do this?
Cheers
Michael