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!

What Form Event is fired when Navigation button used

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
Hello, in Access 2002 I want an event to fire before the record changes when a navigation button is clicked.

I need to check (and save) some data before the record changes. Currently if I save it, it is saved on the wrong record. - The save goes to a related table and is being saved related to the new record.

Thank you,
djj
 
Try the Before Update event of the form. It won't fire if the user hasn't changed anything though. I would have offered the Current event, but I think that will show the new data, not the old.

Paul
MS Access MVP 2007/2008
 
Thank you for the reply. Do you know why the Before Update event would not fire even if an unbound text box has been edited. The Current event is associated with the new record. The problem comes if the user does not save the text. I wanted it to auto save but the users complained.
 
I'd say it was because the data underlying the form hasn't changed, since the control isn't bound to it. The update event of the textbox would fire, but not the form's.

Paul
MS Access MVP 2007/2008
 
An alternative is to create your own navigation buttons, then you will be able to do whatever you need in the click event of your button.

 
Ah yes, Microsoft "helping" out again.

Thank you for your post. The button idea is good but the user will need retrained. "Where is my button?"

Thanks again,
djj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top