Once the interval of 5 is reached a msgbox appears telling the user to perform a test. Now the problem is the msgbox does not appear until the sixth record is scanned. I sure hope this makes sense,not sure how to fix this problem. Below is the code I am using:
Expand|Select|Wrap|Line Numbers
- Private Sub Form_AfterInsert()
- If Not IsNull(Me.SN.Value) Then
- LastPosSN = Me.SN.Value
- End If
- If PosPullTestCount = Me.PullTestNum.Value Then
- MsgBox "Time to perform a pull-test on a scrap cell!"
- PosPullTestCount = 1
- Me.Text30.Value = Me.PullTestNum.Value
- DoCmd.OpenForm "GeneralTabPullTest"
- Else
- PosPullTestCount = PosPullTestCount + 1
- Me.Text30.Value = Me.PullTestNum.Value
- End If
- End Sub