KevinSlater said:if i change the line as you suggested to: SQL_Text ="Insert into main (SHIFTNAME) VALUES('" & Me.shiftname & "');"
i get the following message: "cant append all recorsds in the append query. 1 record due to validation rule violations, do you wish to run the query anyway yes/no, if i click yes it doesnt do anything (main table is emtty) if i click no it says" runtime error: 2501, the runsql action was cancelled"
The fact that you got that message shows that the SQL statement weas syntactically correct, because Access did execute it. However, as the message says (and WorkMad explained) there is a conflict with the data you are trying to append and rules for that field. You need to research that.