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

Form updating table

Status
Not open for further replies.

mikepsc

Programmer
Apr 25, 2006
2
US
Hi. I'm kinda new to Access and object oriented programming (i'm a mainframer with over 20 years of structured Cobol coding), so please bear with me if this sounds like a stupid question. I have a form (linked to a table via the form's 'record source'). It appears that whenever I either exit the form, tab past the last field on the form, or use the mouse wheel, Access will update the record displayed in the form and attempt to retrieve the next record (if still processing the form). Is there any way to stop this (maybe in VBA), and have updates only occur when a command button is pressed? I.e., I have a command button on the form that lets the user back-out and return to a 'selection menu" form, but when it is pressed, the record is still being updated. Thanks.
 
You can try using the form's BeforeUpdate event to incorporate a "want to save changes Y/N?" prompt...
 
Thanks for the quick response, mp9! I dodn't realize that there was a Beforeupdate event at the form level (i've seen it at the individual field level before.) So, I would just need to set the "cancel" parameter to "true" (?) and that would stop the update? Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top