P
Pamela via AccessMonster.com
Hello;
I am trying to figure out how to use the results of a select statement as one
of the values in an insert into statement...I am unclear on the syntax...
The VBA statement I have is as follows:
SQL1 = INSERT INTO tblAssignedHist (RecID, NewUserName,,ChangedBy) Values ("
& [RecID] & "," & """" & [cmbAssignedTo] & """" & ")" & " SELECT qryFetchName.
EmpName FROM qryFetchName"
I know this syntax isn't correct, it's to demonstrate what I want to do...the
first 2 values I want to insert are from controls on a form ([RecID &
[cmbAssignedTo]), the third value is the select statement behind one of the
other controls on the form (txtCurrentUser, an unbound control)
How can I accomplish this? I haven't done SQL in a while and am only used to
Oracle SQL...
Thanks for any help.
I am trying to figure out how to use the results of a select statement as one
of the values in an insert into statement...I am unclear on the syntax...
The VBA statement I have is as follows:
SQL1 = INSERT INTO tblAssignedHist (RecID, NewUserName,,ChangedBy) Values ("
& [RecID] & "," & """" & [cmbAssignedTo] & """" & ")" & " SELECT qryFetchName.
EmpName FROM qryFetchName"
I know this syntax isn't correct, it's to demonstrate what I want to do...the
first 2 values I want to insert are from controls on a form ([RecID &
[cmbAssignedTo]), the third value is the select statement behind one of the
other controls on the form (txtCurrentUser, an unbound control)
How can I accomplish this? I haven't done SQL in a while and am only used to
Oracle SQL...
Thanks for any help.