Greetings...
Today I am trying to create a pass-through query using variables which derive their values from controls on my userform.
I am able to get the below to work which derives its values from a local SQL table
Code:
INSERT INTO tri.TktRqsts (ReqID, EmpID, EmpName, RsnForRqst, RqstdBy, RqstDate)
SELECT tri.TmpTktRqsts.ReqID, tri.TmpTktRqsts.EmpID, tri.TmpTktRqsts.EmpName,
tri.TmpTktRqsts.RsnForRqst, tri.TmpTktRqsts.RqstdBy, tri.TmpTktRqsts.RqstDate
FROM tri.TmpTktRqsts;
But when I try the same idea using variables what I get is the literal string instead of the string value
fwiw - what I am doing is running the code in Access to set the variable values then running the pass-through query outside of the Access VBA Code.
This is the PThrough query that sends the literal string values - (which makes me think I'm close...but)
Code:
INSERT INTO tri.TktEmailTmp (EmpID, EmpName, TempAgency)
VALUES('" & EmpId & "', '" & EmpName & "', '" & TAgncy & "');
As always - Thank you very much...