G
Guest
Hi guys,
I have been trying to figure out the best practices for clearing a form that already has the record ID autokey entered (want to keep this)
I found this snippet:
Dim ctl As Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Then
If (Left$(ctl.ControlSource, 1) <> "=") Then
ctl.Value = ""
End If
End If
Next ctl
but, I do have some required fields and this throws an error for these fields needing to be not null.
also, what about subforms?
anybody have any good experience with this, Im sure others would appreciate it too/
Cheers,
David
I have been trying to figure out the best practices for clearing a form that already has the record ID autokey entered (want to keep this)
I found this snippet:
Dim ctl As Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Then
If (Left$(ctl.ControlSource, 1) <> "=") Then
ctl.Value = ""
End If
End If
Next ctl
but, I do have some required fields and this throws an error for these fields needing to be not null.
also, what about subforms?
anybody have any good experience with this, Im sure others would appreciate it too/
Cheers,
David