J
Jan T.
Here is what I want to put into a variabel; strSQL.
However, I am experiencing some difficulties whith the spaces. What do I do
wrong?
I copied this from my Query-builder in Access 2000.
----------------------------------------------------------------
SELECT [Firstname] & " " & [Lastname] AS Employee
FROM Employees
WHERE ((([Firstname] & " " & [Lastname]) Like [Forms]![myForm].[txtName] &
"*"));
I tried different combinations of ", """, """" """", "'" "'" and so
on...
Like...:
strSQL = "SELECT [Firstname] & "'" "'" & [Lastname] AS Employee"
strSQL = strSQL & " FROM Employees"
strSQL = strSQL & " WHERE ((([Firstname] & "'" "'" & [Lastname]) Like
[Forms]![myForm].[txtName] & '*'));"
But, as you might see, this fails. Any suggestions?
Thank you in advance!
Regards
Jan
However, I am experiencing some difficulties whith the spaces. What do I do
wrong?
I copied this from my Query-builder in Access 2000.
----------------------------------------------------------------
SELECT [Firstname] & " " & [Lastname] AS Employee
FROM Employees
WHERE ((([Firstname] & " " & [Lastname]) Like [Forms]![myForm].[txtName] &
"*"));
I tried different combinations of ", """, """" """", "'" "'" and so
on...
Like...:
strSQL = "SELECT [Firstname] & "'" "'" & [Lastname] AS Employee"
strSQL = strSQL & " FROM Employees"
strSQL = strSQL & " WHERE ((([Firstname] & "'" "'" & [Lastname]) Like
[Forms]![myForm].[txtName] & '*'));"
But, as you might see, this fails. Any suggestions?
Thank you in advance!
Regards
Jan