G
Garu
I am running below procedure on a data entry form but I get this error
(Runtime error 3021: No current record) when the form is closed empty (no
record entered). What is the function to use to check if there is no record
present?
Private Sub Form_Close()
Me.Recordset.MoveFirst
Do Until Me.Recordset.EOF
If Me.ChangeTYpe = "Vacation" Then
Me.QtrID = ""
ElseIf Me.ChangeTYpe = "Occupation" Then
Me.QtrID = Me.txtQtrNoOV.Value
End If
Me.Recordset.MoveNext
Loop
End Sub
Thanks,
Garu
(Runtime error 3021: No current record) when the form is closed empty (no
record entered). What is the function to use to check if there is no record
present?
Private Sub Form_Close()
Me.Recordset.MoveFirst
Do Until Me.Recordset.EOF
If Me.ChangeTYpe = "Vacation" Then
Me.QtrID = ""
ElseIf Me.ChangeTYpe = "Occupation" Then
Me.QtrID = Me.txtQtrNoOV.Value
End If
Me.Recordset.MoveNext
Loop
End Sub
Thanks,
Garu