If a cylinder has been returned i do not want the desciption label to show for that particular cylinder record, with the code below i was trying to do just that but even if a cylinder has been returned or not then the description label doesnt show, can anyone see what is wrong with this coding.
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim StrSQl As String
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * From tbl_TransactionMaster Where [Cylinder Number] = '" & Me![Cylinder Number] & "'")
If rs![R Status] = "Returned" Then
lblDescription.Visible = True
Else
lblDescription.Visible = False
End If
End Sub
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim StrSQl As String
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * From tbl_TransactionMaster Where [Cylinder Number] = '" & Me![Cylinder Number] & "'")
If rs![R Status] = "Returned" Then
lblDescription.Visible = True
Else
lblDescription.Visible = False
End If
End Sub