Full Version: Refresh data during On Click with command button
UtterAccess Forums > Microsoft® Access > Access Forms
I have a database where I have a form based on a table. The information entered into the form is numeric answers to questions entered through check boxes in option groups. The numeric information is to be averaged at the end through a query. I have a command button that brings up another form based on the query. The button sets the query form to the record ID of the main form. The problem is that a user will fill out the main form and then click the button. This will bring up the query form but because the user is still in the record in the main form the query will not run for this record ID. Is there a way to refresh the database when the button is clicked?
Thank you,
I believe the way to do this would be with this line in the On Click event of the command button, at the very beginning, before the query is opened.
If Me.Dirty = True Then Me.Dirty = False
This will force Access to save the record.
Thank you!! This worked!
You're welcome. I am glad I could help.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.