Expand my Community achievements bar.

add form data as new record to microsoft access database

Avatar

Level 3

I searched for this as an answer.

Unsuccessfully.

The conditions are as follows:

1. I have the database connection working and am able to navigate through records.

2. I have not enabled "Delayed Open" on the connection, which, loads the first record from the database.

3. I can "edit", "delete", "update" existing records contained in the database.

4. When I try "xfa.sourceSet.DataConnection.addNew()" the form fields blank for new data.

5. When I type new data into the fields and try "xfa.sourceSet.DataConnection.update()" I of course get an error as the record does not exist yet.

So, the above are the current conditions which do work, to an extent.

What I am trying to do is different, which is to say, I am receiving forms which are filled out already and simply want the data posted to the database.

If I select "Delayed Open" what will I need in order to not lose the data received when I open the database?

And...

How do I then post the current form field data to the database without causing the database to load the first record?

And, of course, then post the form data to the database as a new record?

Please, please, please, I have followed Stefan Cameron's website tutorial and have the work almost complete, yet, I am missing the final steps to post filled out form data to a new record...

0 Replies