What I am trying to do is that if a part of the text is equal to the string then run the procedure. Right no the text box has to equal = "PORT 1 MAT 123 POINT 5 FAIL ALM LVL D" . I just want everyhting that has FAIL ALM LVL D to react to this regardless of what is in front of it. The [text] = " *FAIL ALM LVL D" does not work for me. Can anyone help??
Private Sub Form_Current()
On Error GoTo Err_Form_Current
If [Check28] = False Then 'checks if the alarm seen button is checked
If [Text7] = "PORT 1 MAT 123 POINT 5 FAIL ALM LVL D " Then 'if the text value = an alarm then continue
Dim Counter As Integer
Do While Counter < 200 ' Inner loop runs 200 times
Counter = Counter + 1 ' Increment Counter.
[lblAlarmNotification].Visible = True ' sets the alarm notification text box to visible
[lblAlarmNotification].ForeColor = 255 ' changes color of box to red
DoCmd.Beep ' computer speaker beeps
btn_timer_stop_Click ' runs the timer stop button and freezes the record.
[lblAlarmNotification].Visible = False ' if the alarm doesn't exist the not visible