Ok - this is what I am trying now and I have tried with and with brackets - I am getting an error "Missing ),], or item in query expression
(tblusers.userID='dev)". And if I can't or should not use Execute - in the Set rst, what can I use????
Dim SQL As String
SQL = ("SELECT tblUsers.MgrID " & _
"FROM tblSourcingManagers " & _
"INNER JOIN tblUsers " & _
"ON tblsourcingmanagers.SourcingMgrID = tblUsers.SourcingMgrID " & _
"WHERE (tblUsers.UserID='" & CurrentUser & "'")
Set rst = CurrentProject.Connection.Execute(SQL)
(tblusers.userID='dev)". And if I can't or should not use Execute - in the Set rst, what can I use????
Dim SQL As String
SQL = ("SELECT tblUsers.MgrID " & _
"FROM tblSourcingManagers " & _
"INNER JOIN tblUsers " & _
"ON tblsourcingmanagers.SourcingMgrID = tblUsers.SourcingMgrID " & _
"WHERE (tblUsers.UserID='" & CurrentUser & "'")
Set rst = CurrentProject.Connection.Execute(SQL)