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

Form based on aggregate query

Status
Not open for further replies.

clapag22

Programmer
Mar 9, 2001
239
US
I have a form based on on a query with an aggregate so obviously I cannot update/save any data on this form. There is only one field on this form that may need to be changed. So I wrote a simple update query that will run when that field loses focus. Easy enough. Of course, the form is now considered dirty and if I attempt to exit it will try to save and error out as you would expect.

In my code, I put an undo after I run my simple update query. Here's my problem. The undo works fine, but the field I have just updated reverts to its original value even though the update occured successfully. If I close and reopen the form, the new value will be displayed correctly. Is there anything I can do to prevent this?

TIA
Craig
 
Hi!

You may requery your form (me.requery) after you run update query.

Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top