I am following a simple example to learn to do a simple thing, to add a table to an Access database and add records to that table using SQL:
Here is the tutorial site
The add table works fine for me, but the adding values example gives me the following error:
Run-time error '3075'
Syntax error (missing operator) in query expression "Martin', 'Green".
Here is the code, straight from the link above:
Create table (which works)
DoCmd.RunSQL "CREATE TABLE tblTest ([StaffID] COUNTER CONSTRAINT ndxStaffID PRIMARY KEY, [FirstName] TEXT(25), [LastName] TEXT(30), [BirthDate] DATETIME);"
Add a record to the table (gives me the error):
DoCmd.RunSQL "INSERT INTO tblTest ([FirstName], [LastName], [BirthDate]) VALUES ('Martin’, 'Green’,#09/27/1950#);"
Any ideas?
Thank you!
Here is the tutorial site
The add table works fine for me, but the adding values example gives me the following error:
Run-time error '3075'
Syntax error (missing operator) in query expression "Martin', 'Green".
Here is the code, straight from the link above:
Create table (which works)
DoCmd.RunSQL "CREATE TABLE tblTest ([StaffID] COUNTER CONSTRAINT ndxStaffID PRIMARY KEY, [FirstName] TEXT(25), [LastName] TEXT(30), [BirthDate] DATETIME);"
Add a record to the table (gives me the error):
DoCmd.RunSQL "INSERT INTO tblTest ([FirstName], [LastName], [BirthDate]) VALUES ('Martin’, 'Green’,#09/27/1950#);"
Any ideas?
Thank you!