Unanswered: Adding a Batch ID to a group of records
I have a form that loads a selected number of items into a table for permanent reference, any where from 2 to 200 records. The customer has requestion the ability to do a batch update after the fact which means I will have to tag each group with a batch ID. I think I can sort my way through some logic that will do this using a dmax function on the ID field, then taking that value and adding 1 to it. I'm just thinking this through on the fly.
Do you have any other suggestions on how I could do this?
What do you mean by "tag each group with a batch ID"? and what you you want this for?
If it's for updating all the records that are loaded into the table used as the RecordSource of the form, this is not necessary. You can write them back to their original table with an UPDATE query or a DAO Recordset in a VBA loop.
No, these records get stored with a bunch of related in information in a table as a record of related transactions. The user may not have the related information during the initial load and may need to update all the records loaded at a certain time. I was considering adding a Batch ID to easily recall the whole group and run some updates on them. This has specifically been requested by the user group I am developing this for. There's probably more than one way to skin this cat.
I don't update these records. My customer send reports to a gov't agency on a regular basis. These reports are submitted for product that they make. The user records which reports have been submitted on a list of products select by the user. The record of these reports (not products) is stored and contains information about when it occurred, who did it and what the result was. This all put into a table to be reported on later. There will be cases where a piece of information needs to be added to a batch of reports. I am looking for an easy way to retried this list and update them via a form driven query. I am just looking for the easiest, safest way of tagging each batch of records for easy retrieval. I don't have any problem writing or running the update query at that point.
Can't, there are too many records to pick from and the potential to pick the wrong ones is great. I want the user to be able to select a batch from a list that shows batch id, dates and user. That narrows down their focus.
BTW I figured this out more or less like I thought I could.
I created a BatchID table with a few extra fields like username, date, and reporttype and insert a row in that each time I load data. I then take that id and tag each records with it. Now the user will be able to select the batch based on username, date and description and pull up all the related records in the table.