I am trying to understand why Access is saving blank records and saving when I'm not calling any save logic! One cause of blank record saving is the following code:
Private Function funcClearFields()
Dim ctrl As Control
For Each ctrl In Me.Controls
With ctrl
Select Case .ControlType
Case acComboBox
ctrl.Value = ""
.Requery
Case acTextBox
ctrl.Value = ""
.Requery
Case acMemoBox
ctrl.Value = ""
.Requery
Case acListBox
ctrl.Value = ""
.Requery
End Select
End With
Next
OptGrpAssetOwner.Value = ""
End Function
After it executes this, I have a blank record. Why does Access do this?
Thank you in advance.
SCubed
Private Function funcClearFields()
Dim ctrl As Control
For Each ctrl In Me.Controls
With ctrl
Select Case .ControlType
Case acComboBox
ctrl.Value = ""
.Requery
Case acTextBox
ctrl.Value = ""
.Requery
Case acMemoBox
ctrl.Value = ""
.Requery
Case acListBox
ctrl.Value = ""
.Requery
End Select
End With
Next
OptGrpAssetOwner.Value = ""
End Function
After it executes this, I have a blank record. Why does Access do this?
Thank you in advance.
SCubed