P
Patrick
I've got an error message in my SQL querry when I'm using
as an example: reponse = "Tunney's Pasture". I'm trying to
match any building's name in my building table to that
name.
Here's my code:
Set rsnew = dbs.OpenRecordset("SELECT * from [t
Warranty] " _
& " WHERE Location = '" & reponse & "' AND " _
& " FiscalYear = '" & fYr & "'")
cpt = rsnew.RecordCount
If cpt = 0 Then
MsgBox "No data available for that building,
printing all!"
GoTo skipToFullDataShow
else.....
Now, I know that its a problem with the ' symbol. Because
I tried-it without the symbol and it works just find.
His there a way to make the SQL understand that this
symbol his part of my querry and not the end of it!!!
Can someone help me!!
Patrick....
as an example: reponse = "Tunney's Pasture". I'm trying to
match any building's name in my building table to that
name.
Here's my code:
Set rsnew = dbs.OpenRecordset("SELECT * from [t
Warranty] " _
& " WHERE Location = '" & reponse & "' AND " _
& " FiscalYear = '" & fYr & "'")
cpt = rsnew.RecordCount
If cpt = 0 Then
MsgBox "No data available for that building,
printing all!"
GoTo skipToFullDataShow
else.....
Now, I know that its a problem with the ' symbol. Because
I tried-it without the symbol and it works just find.
His there a way to make the SQL understand that this
symbol his part of my querry and not the end of it!!!
Can someone help me!!
Patrick....