Since you are mixing items that is supposed to be resloved within the query and at run time, I'm not sure what's happening, but since you are passing "' var '" in one string and "' N/A '" in the other, it should give a match -> both should return 39 (the single quote, the Asc function returns the character code for the first character in a string)
But I don't understand how the SQL is supposed to work (but, then I don't understand much of SQL;-)). And again, I think one uses the Like operator on text with wildchards, but uses the equal sign on numerics.
Won't you rather try telling us what you are trying to achieve, perhaps with some sample data, and we'll se if we can help - and shouldn't this rather be in the query and sql forum?
If the Asc function only return a value for the first character, it's useless to me...
I'm trying to do a case sensitive comparison... I didn't want to use the StrComp function because, I won't be able to use a wildcard with that function, I think....
I tried to dynamically alter my pass-through query, but I could not get my querydef to refresh with the new where clause in time for me to run the report for the first time, it works only after the first try... I don't know if it's because my main menu has an ODBC connection open to SQL server...
Don't know what to do anymore... I feel like smashing my computer!!!
I use the Collate keyword to change the character set to be case sensitive, it works like a charm, my problem is changing the query on the fly for the users who wants to use that option and the others who doesn't.
I tried CurrentDB.QueryDefs.Refresh but somehow when the reports runs for the first time, it still uses the orginal query...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.