Isaac
Lifelong Learner
- Local time
- Yesterday, 22:21
- Joined
- Mar 14, 2017
- Messages
- 8,738
I have a bound form whose recordsource is a Sharepoint list. The only code in the form's load event is:
There is code in the form's BeforeUpdate event:
Even if the only thing I do is open the form and then close it, I get the message "You can't save this record at this time"
If I comment out the form's BeforeUpdate event code, I don't get the pop-up warning, but then of course, a new record gets created.
The form's Data Entry property is set to "Yes" - and indeed, that is the sole intended purpose of the form.
Is this totally normal? I cannot remember. By opening/going to a new record (with absolutely no other action of any kind to dirty it), has Access already begun to create the new record? It seems like this should only happen if and when some other act dirties it - like entering anything in a bound control. Kind of like you see if you open a Table in Datasheet mode...and the ID gets created at the moment you begin typing in a column--otherwise, it's just like a 'pending potential' new record.
Code:
blAllowSave_frmDP2_CreateRecord = False 'global variable
Me.txtPRL.SetFocus 'bound textbox
There is code in the form's BeforeUpdate event:
Code:
If blAllowSave_frmDP2_CreateRecord = False Then
Cancel = True
End If
Even if the only thing I do is open the form and then close it, I get the message "You can't save this record at this time"
If I comment out the form's BeforeUpdate event code, I don't get the pop-up warning, but then of course, a new record gets created.
The form's Data Entry property is set to "Yes" - and indeed, that is the sole intended purpose of the form.
Is this totally normal? I cannot remember. By opening/going to a new record (with absolutely no other action of any kind to dirty it), has Access already begun to create the new record? It seems like this should only happen if and when some other act dirties it - like entering anything in a bound control. Kind of like you see if you open a Table in Datasheet mode...and the ID gets created at the moment you begin typing in a column--otherwise, it's just like a 'pending potential' new record.