I have copied this from a query but I do not know how to end or close or format the Where statement which is causing the select statement not to work. And will this work for a table in the same database?
Set rs = Currentdb.OpenRecordset("SELECT tblSourcingManagers.MGR_Code "& _
"FROM tblSourcingManagers INNER JOIN tblUsers ON tblSourcingManagers.SourcingMgrID = tblUsers.SourcingMgrID " & _
"WHERE (((tblUsers.UserID)=[CurrentUser])) OR ((([currentuser]) In ('VP1','EVP','SD')))
Set rs = Currentdb.OpenRecordset("SELECT tblSourcingManagers.MGR_Code "& _
"FROM tblSourcingManagers INNER JOIN tblUsers ON tblSourcingManagers.SourcingMgrID = tblUsers.SourcingMgrID " & _
"WHERE (((tblUsers.UserID)=[CurrentUser])) OR ((([currentuser]) In ('VP1','EVP','SD')))