Hi guys. I think this is pretty siple but cant seem to resovle its syntax. Heres my code and what im trying to achieve;
I want to user to type in values in a textbox..then the value is used as a criteria for a DCount function to determin is records exist.
Source Field Data Type is NUMBER
QUESTION:
1) Can or should I use a string valriable and build the like (wildcard) expression to use as a criterion or can or should I build the LIKE expression within the DCount expression, and if so.. can someone help me with that dcount and LIKE syntax?
THANKS ALL FOR ANY GUIDENCES!
Private Sub Combo89_Change()
Me.Refresh
Dim LNumofRecs As String
Dim qryPRM As String
qryPRM = Forms![frmTIMESHEET_MAINMENU]![Combo89] & "*"
LNumofRecs = DCount("*", "qry_MAINMENU_QRY_LT_RESULTS", "[LT] = " & qryPRM & "")
Me.Requery
If LNumofRecs <= 0 Then
MsgBox ("no rec found!")
Exit Sub
End If
End Sub