Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2011
    Location
    Richmond, VA
    Posts
    38

    Question 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?

    Paul

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    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.
    Have a nice day!

  3. #3
    Join Date
    Aug 2011
    Location
    Richmond, VA
    Posts
    38
    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.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I still don't think I understand what you need to do.

    If you can use criteria to extract some records that you want to update to include a BatchID, then the answer is still an UPDATE query or using VBA to loop through the records and update them.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Aug 2011
    Location
    Richmond, VA
    Posts
    38
    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.

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I think you just need to add a "Selected" Yes/No field to the reports table so you can tick which ones you'd like to update in a continuous form.

    Then your update SQL or code can just pull out all those with "Selected = True".
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Aug 2011
    Location
    Richmond, VA
    Posts
    38
    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.

  8. #8
    Join Date
    Aug 2011
    Location
    Richmond, VA
    Posts
    38
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •