I want to take a number in a text box and compare it to a field returned by a query. This is what I have so far.
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Open Call Query")
If Me.Decom_Terminal = rs.Terminal Then
MsgBox "There is an open trouble call for this terminal."
End If
This is under the after update event. When i enter a terminal nothing happens I dont get an error or anything but it doesnt work. Any ideas on what I am doing wrong would be greatly appreciated.
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Open Call Query")
If Me.Decom_Terminal = rs.Terminal Then
MsgBox "There is an open trouble call for this terminal."
End If
This is under the after update event. When i enter a terminal nothing happens I dont get an error or anything but it doesnt work. Any ideas on what I am doing wrong would be greatly appreciated.