Code:
Private Sub LID_AfterUpdate()
On Error GoTo ErrorHandler
Const cQuote = """"
Me!Operator.DefaultValue = cQuote & Me!Operator.Value & cQuote
Me!Process.DefaultValue = cQuote & Me!Process.Value & cQuote
Me!Goal.DefaultValue = cQuote & Me!Goal.Value & cQuote
ExitHandler:
Exit Sub
ErrorHandler:
Select Case Err
Case 3205
MsgBox "LID has already been recorded. Please use alternative LID."
DoCmd.Hourglass False
Resume ExitHandler
Case Else
MsgBox Err.Description
DoCmd.Hourglass False
Resume ExitHandler
End Select
Exit Sub
DoCmd.RunCommand acCmdSaveRecord
Me![qrySubForm subform].Requery
If Hour(Now()) > Nz(Me.tbxHour, -1) Then
Me.tbxCount = 0
Me.Goal = 35
Me.tbxHour = Hour(Now())
End If
Me.tbxCount = Me.tbxCount + 1
Me.Requery
End Sub
Still does not let me save and requery the form.