Hello again.
This is probably going to be and easy one for you all but I just cant figure it out. I'm trying to get the inputed data from a forms test boxes to be put into a new row in a table.
Here's what I've got:
Private Sub AddNewUser_Click()
SQL = "INSERT INTO tblUserInfo(FirstName, LastName, Address, City, Province, PostalCode, Country, EmalAddress, HomePhone, MobilePhone, FaxNumber) VALUES (FORMS!UserInfo!FirstName, FORMS!UserInfo!LastName, FORMS!UserInfo!Address, FORMS!UserInfo!City, FORMS!UserInfo!Province, FORMS!UserInfo!PostalCode, FORMS!UserInfo!Country, FORMS!UserInfo!EmailAddress, FORMS!UserInfo!HomePhone, FORMS!UserInfo!MobilePhone, FORMS!UserInfo!FaxNumber)"
DoCmd.RunSQL SQL
End Sub
I want it to happend on click but I get the Compile error every time.
Any help would be nice.
Thank you.
This is probably going to be and easy one for you all but I just cant figure it out. I'm trying to get the inputed data from a forms test boxes to be put into a new row in a table.
Here's what I've got:
Private Sub AddNewUser_Click()
SQL = "INSERT INTO tblUserInfo(FirstName, LastName, Address, City, Province, PostalCode, Country, EmalAddress, HomePhone, MobilePhone, FaxNumber) VALUES (FORMS!UserInfo!FirstName, FORMS!UserInfo!LastName, FORMS!UserInfo!Address, FORMS!UserInfo!City, FORMS!UserInfo!Province, FORMS!UserInfo!PostalCode, FORMS!UserInfo!Country, FORMS!UserInfo!EmailAddress, FORMS!UserInfo!HomePhone, FORMS!UserInfo!MobilePhone, FORMS!UserInfo!FaxNumber)"
DoCmd.RunSQL SQL
End Sub
I want it to happend on click but I get the Compile error every time.
Any help would be nice.
Thank you.