Hi,
I have a form to add new employees (LastName and FirstName with new unseen EmployeeID) to Employees table. I have a save (it saves the record and goto NewRecord) and cancel button
, which basically delete what is typed in both fields of the form.
Both work as expected.
My problem is since I put this form in a navigation form, if I type something and leave the tab, it will save the record and I would like to avoid that.
I thought "Easy, I will apply the RunMenuCommand UndoRecord as above but on exit event"
Unfortunately I recieve an error message that maybe database is in read only or maybe the undoRecord is not supported by this version of Access (which make no sense since the cancel button works).
Strangely enough, the message comes when I come on the tab, not when I leave it.
Should I add a condition to the exit event that if there are caracters in one of the fiels, undo record or is it the RunMenuCommand that can not be associated to a tab? Any suggestion?
I have a form to add new employees (LastName and FirstName with new unseen EmployeeID) to Employees table. I have a save (it saves the record and goto NewRecord) and cancel button
Code:
RunMenuCommand
Command UndoRecord
Both work as expected.
My problem is since I put this form in a navigation form, if I type something and leave the tab, it will save the record and I would like to avoid that.
I thought "Easy, I will apply the RunMenuCommand UndoRecord as above but on exit event"
Unfortunately I recieve an error message that maybe database is in read only or maybe the undoRecord is not supported by this version of Access (which make no sense since the cancel button works).
Strangely enough, the message comes when I come on the tab, not when I leave it.
Should I add a condition to the exit event that if there are caracters in one of the fiels, undo record or is it the RunMenuCommand that can not be associated to a tab? Any suggestion?
Last edited: