I'm using the ADO data control. I build a string for my SELECT statement to look up a user name, such as:
I then assign pc_select to .recordsource:
When running the program with a breakpoint in that area, my "immediate window" shows my pc_select correctly displaying the string, for example:
But... after assigning pc_select to the .recordsource,
.recordsource shows:
Of course, my query never finds "mike" since it is in lower case.
Why the change of case, and how can I fix that?
Code:
pc_select="SELECT * FROM user WHERE username='" & UCASE(username) & "'"
I then assign pc_select to .recordsource:
Code:
pc_select=.recordsource
When running the program with a breakpoint in that area, my "immediate window" shows my pc_select correctly displaying the string, for example:
Code:
"SELECT * FROM user WHERE username='MIKE'
But... after assigning pc_select to the .recordsource,
.recordsource shows:
Code:
"SELECT * FROM user WHERE username='mike'
Of course, my query never finds "mike" since it is in lower case.
Why the change of case, and how can I fix that?