I have a button that opens a form and goes to a new record and vba automatically fills in a textbox and a combo box. I have a canel button that contains
Form![FormName].undo
DoCmd.Close acForm, "FormName"
it deletes everything the user puts in himself but keeps the record with the fields vba filled in. I have looked at forums and it says to add cancel = true in beforeupdate event of form, however doesn't seem to be working, I even put a Msgbox textbox to test beforeupdate worked but it doesn't appear. I checked the table and it saves the new record as soon a vba fills it in. Any help appreciated thanks
Form![FormName].undo
DoCmd.Close acForm, "FormName"
it deletes everything the user puts in himself but keeps the record with the fields vba filled in. I have looked at forums and it says to add cancel = true in beforeupdate event of form, however doesn't seem to be working, I even put a Msgbox textbox to test beforeupdate worked but it doesn't appear. I checked the table and it saves the new record as soon a vba fills it in. Any help appreciated thanks