I am having trouble getting my SQL string to operate correctly. I have modified an online application for my use but I think because the fields were all text. I continuously receive an Error 13: Type mismatch.
I have three list boxes, one to capture the ID number (number), the City (text) and Area (text).
There is a button that pulls all the responses in the following variables:
strID
strCity
strArea
The SQL string is the following:
The following variables represent the users selection of AND or OR when creating the query. So if the user selects the AND option button for a query, then the following string variables becomes an AND (or OR).
strCityConditio n
strAreaConditio n
I thought by making the string equaling the variable would resolve it. When I removed the equals sign and replaced with the ampersand &, to concatenate the string.
There was no change.
How can I make the [GrID] string accept a numeric user entry?
Thanks.
I have three list boxes, one to capture the ID number (number), the City (text) and Area (text).
There is a button that pulls all the responses in the following variables:
strID
strCity
strArea
The SQL string is the following:
Code:
strSQL = "SELECT tbMaster_A.* FROM tbPrograms " & _ "WHERE tbMaster_A.[GrID] = " & strID & _ strCityCondition & "tbMaster_A.[City]" & strCity & _ strAreaCondition & "tbMaster_A.[Area]" & strArea & "';"
strCityConditio n
strAreaConditio n
I thought by making the string equaling the variable would resolve it. When I removed the equals sign and replaced with the ampersand &, to concatenate the string.
There was no change.
How can I make the [GrID] string accept a numeric user entry?
Thanks.
Comment