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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh form without updating table HELP!!!!

Status
Not open for further replies.

danvzla

Programmer
Jan 16, 2004
28
FI
I got a Form with many comboboxes and textboxes that update a table. Every time I run a command such as Refresh or Recalc (to update comboboxes for next use),exit form, or go to a different form, all the information that was in the textboxes and comboboxes goes to my table. How can I stop the table to be updated when running these commands. The table needs to be updated at the end, when all the information is filled and the "Ready button" is pressed
 
Are you doing a Refresh on the Form as a whole or on the individual Comboboxes?

I'm assuming that when you are 'Refreshing', you are actually wanting to update the list of data contained with the comboboxes rather than the 'value' of the Combobox.

Alec Doughty
Doughty Consulting P/L

"Life's a competition. Play hard, but play fair"
 
I was doing a refresh of all the form. Now I'm using a requery of the combobox that have to be updated and is working.

But when I close the form is still updating the table. How can I stop that.
 
Well, You can't actually stop a bound form from Updating its underlying recordsource when it closes.

What you can do is use the forms BeforeUpdate() event to check that all required fields have been filled in with valid data, and cancel the update if your conditions are not met. This will stop the form from doing whatever caused the update (be that closing, moving to another record or just losing focus to another form).

Alec Doughty
Doughty Consulting P/L

"Life's a competition. Play hard, but play fair"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top