B
brianv
i am trying to write an express which will insert a single row into a table.
the table, Ingredients, has 2 fields.
Ingredients:
IngredientId autoNumber
Ingredient text
my expression looks like:
DoCmd.RunSQL "Insert INTO Ingredients(Ingredient) Values ('" &
Me.Ingredient & "')"
when i run it it says it is going to append 1 row. i click ok then i get an
error which says
1 row was not added due to a key violation. can you tell me what is wrong.
i assumed that i would not insert the IngredientId because it was an
autoNumber type.
thanks
brian
the table, Ingredients, has 2 fields.
Ingredients:
IngredientId autoNumber
Ingredient text
my expression looks like:
DoCmd.RunSQL "Insert INTO Ingredients(Ingredient) Values ('" &
Me.Ingredient & "')"
when i run it it says it is going to append 1 row. i click ok then i get an
error which says
1 row was not added due to a key violation. can you tell me what is wrong.
i assumed that i would not insert the IngredientId because it was an
autoNumber type.
thanks
brian