Hello there, so in access I have borrowed this code that I found to disable auto save in access form and enable at the end. It works, except, it doesn't allow my form to update the lookup fields attached:
Private mIsUserUpdate As Boolean 'Flag
'Cancel Auto Save
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not mIsUserUpdate Then Cancel = True
End Sub
'Manual Save
Private Sub YourButtonName_Click()
'...
'Do work
'...
mIsUserUpdate = True 'OK to save
DoCmd.RunCommand acCmdSaveRecord
mIsUserUpdate = False 'Revert
End Sub
Do you guys know a work around to where that can update as well? I have tried several codes for the same process and all are the same issue...
Private mIsUserUpdate As Boolean 'Flag
'Cancel Auto Save
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not mIsUserUpdate Then Cancel = True
End Sub
'Manual Save
Private Sub YourButtonName_Click()
'...
'Do work
'...
mIsUserUpdate = True 'OK to save
DoCmd.RunCommand acCmdSaveRecord
mIsUserUpdate = False 'Revert
End Sub
Do you guys know a work around to where that can update as well? I have tried several codes for the same process and all are the same issue...