Hello, I have a form where user enters a case number into a text box and on the after update property i need one of two labels to become visible based on if the case number is on the table tblQualityAudit. the case number is numeric, and the field property is set to double on the table as well as the text box property. below is the code that I have.
Private Sub txtLookup_AfterUpdate()
Dim dblCase As Double
dblCase = txtLookup
If strCase = DLookup("case", "tblQualityAudit") Then
Me.lblReject.Visible = True
Else
Me.lblGood.Visible = True
End If
End Sub
when testing, the lblGood appears for everything. even if the case number is in the tblQualityAudit. not sure if there is an issue with the DLookup or maybe I am missing something. any help would be appreciated.
Also if you can give insight on how to make the label go back to not visible when the user goes to enter a new value that would be awesome too
Thanks in advance
Steve