R
ruchie
I am getting a syntax error while running the below-mentioned query in
VBA (Access), and I am not sure why.
I am trying to insert a record in a table (tblEmp). i am pulling in
data through a form (AddUser).
DoCmd.RunSQL ("INSERT INTO tblEmp (empName, Group, LOCATION, Group
Name, Title, Start_Date) VALUES(Forms!Form_AddUser!fname + ' ' + Forms!
Form_AddUser!lname, Forms!Form_AddUser!group, loc, Forms!Form_AddUser!
GName, Forms!Form_AddUser!title, Forms!Form_AddUser!DTPicker1);")
loc is an integer variable, created within the VBA only. it is not
being pulled in from the form.
I am fairly new to the VBA. Could anyone please let me know where I am
going wrong?
VBA (Access), and I am not sure why.
I am trying to insert a record in a table (tblEmp). i am pulling in
data through a form (AddUser).
DoCmd.RunSQL ("INSERT INTO tblEmp (empName, Group, LOCATION, Group
Name, Title, Start_Date) VALUES(Forms!Form_AddUser!fname + ' ' + Forms!
Form_AddUser!lname, Forms!Form_AddUser!group, loc, Forms!Form_AddUser!
GName, Forms!Form_AddUser!title, Forms!Form_AddUser!DTPicker1);")
loc is an integer variable, created within the VBA only. it is not
being pulled in from the form.
I am fairly new to the VBA. Could anyone please let me know where I am
going wrong?