Automating form actions

alktrigger

Aimless Extraordinaire
Local time
Today, 16:50
Joined
Jun 9, 2009
Messages
124
I'm trying to create a form that will allow me to modify multiple entries at once. Each entry consists of 2 checkboxes. My goal is to create a form that, once started, creates all the daily entries (nearly 50), then opens a single spreadsheet/query/database for editing of the daily entries.

Any advice on where to start?
 
There are various ways to do this. You can do it with a query but the catch is that you have to cheat. You can do an append query to your table based on an improperly constrained JOIN so that you get a permutation of your entries with the correct date.

Because it requires a technical violation of the JOIN rules, I dislike this approach. I have a problem somewhat like that right now that will require me to write some VBA code to build records on one table that are based on another table that I just read in order to get the proper linking fields.

Doing this in VBA, you would open two recordsets. One could be opened APPEND ONLY (one of the recordset modes) and the other READ ONLY (another recordset mode). Then for every record in the READ ONLY recordset, do an .ADDNEW to the APPEND ONLY recordset, update the fields, and then do a .UPDATE. The trick will be constraining the READ ONLY recordset so you get the right number of records, no more and no less.

As for anything that involves opening something, the Keep-It-Clean rule applies. If you open it, close it. The recordsets will be a big part of that.
 
Well I guess I'll a better way of describing it...

I have one table with a list of contacts. Everyday I need to create an entry for each of those contacts verifying if data has been received. This data is to be spread between 2 different tables (1st table, "received", has entries for date, contactID, and 2 yes/no fields. The 2nd table, "issues", consists of one date, 2 memo fields, and the relevant ID on the "received" table). The "issues" table is there to collect optional data and does not have an entry for every field in the "received" table.

What would be the best method to approach this? So that, with a single click, I can create the 50 empty fields in the "received" table, then return and edit them, possibly adding fields in the "issues" table as I go?

It seems to me the second part, returning and editing can easily be done with a query. But how can i go about creating the bulk records in the first place?
 
I guess the question really boils down to, how do I set my database up so that I can bulk create a set number of predetermined fields?
 

Users who are viewing this thread

Back
Top Bottom