Hi,
I'm trying to run an SLQ with two conditions in a table form.
The first condition is a normal txtSearchString application, but I would like to only display some of the d
ata. the (simplified) code I'm currently using is the following:
txtSearchString = Me!TxtX.Text
strSQL = "SELECT DISTINCT tlb.ID as ID, tlb.Code as Code FROM tlb "
strSQL = strSQL & "WHERE ((tlb.ID) Like '" & txtSearchString & "*') "
strSQL = strSQL & "ORDER BY lb.ID"
The problem I have is that not all my data have a Code in tbl, I just want to display value selected with the txtSearchString which have a code in tbl.
Can you help me please, hope this is clear enough.
thanks,
Steph
I'm trying to run an SLQ with two conditions in a table form.
The first condition is a normal txtSearchString application, but I would like to only display some of the d
ata. the (simplified) code I'm currently using is the following:
txtSearchString = Me!TxtX.Text
strSQL = "SELECT DISTINCT tlb.ID as ID, tlb.Code as Code FROM tlb "
strSQL = strSQL & "WHERE ((tlb.ID) Like '" & txtSearchString & "*') "
strSQL = strSQL & "ORDER BY lb.ID"
The problem I have is that not all my data have a Code in tbl, I just want to display value selected with the txtSearchString which have a code in tbl.
Can you help me please, hope this is clear enough.
thanks,
Steph