can someone help me with this adding new items using infopath 2007.
i have create a form based on sql database connection.
i have 2 tables that are related to each other. table A is the user table with the user name and id in it. table B is the vacation days table that has the days that the user went or will go on vacation.
in my form i have set 2 field with the user and the user id and a repeating section with the absence/vacation days in it.
when i go to preview the form and click on the "run query" both the fields and the repeating section are filled correctly. and if i click on insert item to insert a new item it submit fine to the database.
but what i need is that the user must fill a new form. when i click on the "new" button it cleared all the fields. but i dont want it to clear the username and the userid field.
i want the user to open a blank form with only his username and userid already filled in.
i know how to autopapulate those fields. but everytime i try to insert new absence dates. it gives me this error:
Violation of PRIMARY KEY constraint 'PK_USER'. Cannot insert duplicate key in object 'dbo.USER'.
another error i have got once was that i need to insert the 2 keys i have in the tables.
but i dont want that the user fill in the keys
View Complete Post