To anyone who may be able to help.
I have just started using infopath as part of an adhoc request system.
The process is as follows: the user registers a request by filling in a form I have created in infopath and the subsequent details are written to an access database using the submit button functionality. However, the primary key, or the unique Identifier of that particular record or adhoc request (as the user sees it) is not updated in the database until he/she clicks "submit".
In the mean time another two users may have aquired the same unique Identifier (this is a problem because the next unique indentifier will be created by simply incrementing the max record number in the primary key of the database by 1, which is fine with one user at a time) because the first user has not submitted, and therefore not updated the database, subsequent users keep getting the same unique ID (number) for their request (the same highest number plus one..). then they hit submit at different times and will all have the same unique key, because the key is not updated in the database as soon as the user opens the form.
Essentially I cannot allow concurrent access at the moment without ending up with duplicate keys.
What I was wanting to know (and have been trying to figure out for a good while now) is how I can write a script perhaps that will allow the primary key to be updated, in the database, when the user opens the form as opposed to when they hit the submit button, and then after when they do hit the submit button the same record is updated with the information they have filled in.
How do I update a SINGLE field in my access database (with infopath), without submitting the whole form? how do I reference the field in the database(not the xml schema xpath, which I think refers to the form fields? or is xpath the database reference????) so that as soon as the user opens the form, the unique value of their form is automatically written to the database, and therefore stopping another user from getting the same value when they open up another form, at the same time (before the other user has submitted).
Essentially I need a way, or an object that allows me update/write access to the individual fields in my database on the "openevent" of my form.
If anyone has any advice with regard to this it would be much appreciated.