Hi All,
I got a problem with the value of a control when I try to implement it to a SQL query. I got two cases, the first work but not the second.
The first collect a number from a control, the second collects text from another control. I call on the controls in the same way, Me!Control1 resp. Me!Control2.
The fault is that when I use the value of Control2 (… WHERE tblProject.ProjectName = " & Me!Control2) SQL won’t recognize the value. If I change ( = " & Me!Control2) to (= ‘The string that I need’) is works perfectly fine.
I believe that it’s because the value of Me!Control2 is of data format text? I’m I right? How could I use this value in my SQL query?
Cheers!
I got a problem with the value of a control when I try to implement it to a SQL query. I got two cases, the first work but not the second.
The first collect a number from a control, the second collects text from another control. I call on the controls in the same way, Me!Control1 resp. Me!Control2.
The fault is that when I use the value of Control2 (… WHERE tblProject.ProjectName = " & Me!Control2) SQL won’t recognize the value. If I change ( = " & Me!Control2) to (= ‘The string that I need’) is works perfectly fine.
I believe that it’s because the value of Me!Control2 is of data format text? I’m I right? How could I use this value in my SQL query?
Cheers!