Hi
I have a table called "tbl-users" and I need to get from it the UserID that has a HCAUserID that matches strloginname. strloginname is actually a number.
I am trying to use a SELECT statement.
All I get in the message box is what's between quotations.
What am I doing wrong?
I have a table called "tbl-users" and I need to get from it the UserID that has a HCAUserID that matches strloginname. strloginname is actually a number.
I am trying to use a SELECT statement.
Code:
Dim Name As String
Name = "SELECT [UserID] FROM [Tbl-Users] WHERE [HCAUserID=Strloginname]"
MsgBox Name
All I get in the message box is what's between quotations.
What am I doing wrong?