Grabbing data in a query from a form with all unbound fields RRS feed

  • Question

  • I have a complicated master record and when new data is entered, I want to look for consistency and I do a lot of testing. On top of that I calculate dates. The idea is to let the operator review the data and approve it. At that point I want to create an append query, grabbing all the data and adding it to the table.

    My problem is that the query will not pick up fields that are generated (the date fields) or fields that have default values. I describe each fiel in the grid as Forms!frmX!Fieldname. It selects all the fields except those mentioned.

    Any Ideas why this is happening or is my whole approach wrong?

    I do not want the record saved until it is good.

    Bob Volante

    Tuesday, December 19, 2017 8:15 AM

All replies

  • Any Ideas why this is happening or is my whole approach wrong?

    Hi Bob,

    This is about the way I normally work. But unfortunately I can not see what is happening on your side.

    I assume you create a QueryDef, and in the query you include the values of the controls through reference to Forms!FrmX!Fieldname, and then run the query.

    I do not use QueryDefs, but instead I run a small Sub on pressing the approve button. In this Sub a new record is created using the DAO method AddNew. Fields are filled by assigning them with Me!Fieldname. In my case this always works. This is very versatile.


    Tuesday, December 19, 2017 8:46 AM