I am trying to confirm if a work order (RONum) is still in Open status (IsOpen). My table has may lines for each work order but they should all have the same value for IsOpen. I am trying to find one line item with a match to RONum and return the value of IsOpen. Below is the code I started with but I am getting an error "Object Required." I am using a simple form to test the functionality but will then use the solution in another more complicated form. Any assistance will be appreciated.
VBA Code:
Private Sub Go_Click()
Dim strRO As String
Dim blnIsOpen As Boolean
blnIsOpen = True
strRO = txtRONum
'MsgBox "strRO = " & strRO, vbOKOnly
If tblPartsTracking.RONum = strRO And tblPartsTracking.IsOpen = True Then
MsgBox "RO " & strRO & " is open.", vbOKOnly
Else
MsgBox "RO " & strRO & " is closed.", vbOKOnly
End If
End Sub