J
Jack G
I have a very simple table with just 2 columns: Employee-ID and Employee.
The first field is Autonumber Text. I am wanting to programatically add
records to this table and I tried to use this:
SQLstring = "INSERT INTO EMPTABLE ([Employee]) " & "VALUES ('" & NewName &
"');"
DoCmd.RunSQL SQLstring
where NewName is a string that was defined earlier.
I couldn't get this to work and finally decided it must because I need to
say what BOTH fields will be, not just the Employee field. If that's right,
then I don't know what to say for the first field which is an AutoNumber
field assigned by Access:
INSERT INTO EMPTABLE ([Employee-ID]) ([Employee]) " & "VALUES ('" & ???? &
NewName & "');
Any help would be appreciated.
Jack
The first field is Autonumber Text. I am wanting to programatically add
records to this table and I tried to use this:
SQLstring = "INSERT INTO EMPTABLE ([Employee]) " & "VALUES ('" & NewName &
"');"
DoCmd.RunSQL SQLstring
where NewName is a string that was defined earlier.
I couldn't get this to work and finally decided it must because I need to
say what BOTH fields will be, not just the Employee field. If that's right,
then I don't know what to say for the first field which is an AutoNumber
field assigned by Access:
INSERT INTO EMPTABLE ([Employee-ID]) ([Employee]) " & "VALUES ('" & ???? &
NewName & "');
Any help would be appreciated.
Jack