I haven't tested this, but it should work.
The lines I added are in blue.
(Cleaned up a couple of other things....)
Code:
Option Compare Database '<-- should be at the top of every module
Option Explicit '<-- should be at the top of every module
Private Sub FindTAG_AfterUpdate()
Const conTimeLimit As Date = #11:11:00 AM#
Const conMaxAmt As Integer = 7
Dim rs As DAO.Recordset
Dim x As Integer
x=0
If Me.FindTAG & vbNullString <> vbNullString Then
Set rs = Me.RecordsetClone
rs.FindFirst "[TAG]=" & Me.FindTAG
If rs.NoMatch Then
DoCmd.GoToRecord acActiveDataObject, , acNewRec
Me!Tag = Me.FindTAG
Me.TimeIn = Now()
Me.HourlyRate = 6
MsgBox "Ticket Added, Click 'OK' To Continue!"
DoCmd.GoToRecord acDataForm, "CTPLLC", acNewRec
Forms!CTPLLC!FindTAG.SetFocus
Else
Me.Bookmark = rs.Bookmark
If IsNull(Me.TimeOut) Then
Me.TimeOut = Now()
Me.ElapsedTime = DateDiff("n", Me.TimeIn, Me.TimeOut)
'If Me.TimeIn > Date()#11:00 AM# Then x = 7
Select Case Me.ElapsedTime
Case 1 To 20
x = 2
Case 21 To 40
x = 4
Case 41 To 60
x = 6
Case 61 To 80
x = 8
Case 81 To 100
x = 10
Case 101 To 660
x = 12
Case 660 To 845
x = 17
End Select
If Me.ElapsedTime > 17 Then
MsgBox "WARNING!!! Time is over 11 hours!"
Else
'check for max time
If Me.TimeOut > conTimeLimit Then
Me.AmountOwed = conMaxAmt
Else
Me.AmountOwed = x
End If
If Me.Dirty Then
Me.Dirty = False
End If
End If
Else
MsgBox "NOTICE:This is a previously Used Ticket!"
Forms!CTPLLC!Next.SetFocus
End If
End If
rs.Close
Set rs = Nothing
Me.FindTAG = Null
End If
End Sub