Using an append query link to a cmd button

pafcpilgrim

Keeping it Green
Local time
Today, 21:38
Joined
Apr 14, 2005
Messages
36
Guys,

Please can you help me find the issue to my problem that is probably hitting me in the face.

I have an unbound form to which i use an append query to post the data from the fields on the form to a table.
The table is set up very simple and has a primary key which i will never duplicate as you would expect.

Once i have inputted one lot of data into the form the command button runs the query and the data is posted to the table fine. The problem i am having is that the second lot of information i go to append the query refuses to add.
I get the validation rule violations error and it won't post the data.

If i close out of the form, open it again and input the same information the query adds it fine and again the second lot you get the error message.

i had this problem before but for the love of me cannot remember how i resolved it. I have had to keep closing the form after each entry to post the information.

Any help much appreciated.
 
Why use an unbound form? It would be much easier to bind it and you wouldn't have these problems.
 
Hmm...

It might be because you haven't closed the table, or something of that nature.

I would try running your action queries without using the form. If they both work OK, then I would suggest looking at the code in your form and making sure that you don't still have the table opened after you run your first action query.
 

Users who are viewing this thread

Back
Top Bottom