Mass Updates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm working on a form that offers check boxes for the selection of records to be updated to a new status level (from "Requested" to "Acknowledged"). If a box remains unchecked, the record is not to be updated. I'd like to do this without the update query, if possible, so I don't have to make a new update query for each update occurrence (after Acknowledged comes Scheduled, Completed, Approved, and Finalized). I want to just do these via macros, applyfilter actions, and hopefully SevValue actions. I've got it running, but it's only updating the current record. How can I get it to apply the update to all the records in the filter? Would a datasheet view do it, or a subform? I'd rather not use the subform (but I will if there's no other option) because I like the formatted fom. I've got no Access VBA coding experience.

I've checked on AccessWeb (offline) as put together by a bunch of the MVPs, but I didn't see anything in there, or else I missed it.

Thank you!
Derek
 
I'm working on a form that offers check boxes for the selection of records to be updated to a new status level (from "Requested" to "Acknowledged"). If a box remains unchecked, the record is not to be updated. I'd like to do this without the update query, if possible, so I don't have to make a new update query for each update occurrence (after Acknowledged comes Scheduled, Completed, Approved, and Finalized). I want to just do these via macros, applyfilter actions, and hopefully SevValue actions. I've got it running, but it's only updating the current record. How can I get it to apply the update to all the records in the filter? Would a datasheet view do it, or a subform? I'd rather not use the subform (but I will if there's no other option) because I like the formatted fom. I've got no Access VBA coding experience.

An update query is the only good way to do this - but you only need
one of them, not four. You can update the status field to

=Choose(Forms!yourform!chkScheduled = True, "Scheduled",
Forms!yourform!chkCompleted = True, "Completed",
Forms!yourform!chkApproved = True, "Approved",
Forms!yourform!chkFinalized = True, "Finalized",
True,[Status])

Better might be to put the four checkboxes in an Option Group control
which will return a number 1, 2, 3 or 4 and use the Switch function
instead (see the online help).
 
Thanks, John. I hate to admit it, but I'm not sure if I understand the function you have. I assume that it would work this way..

If the records that are "selected" by checkbox all have the value "Requested", they would all be updated with "Acknowledged", then I could still do some things in the macro before I turn the checkboxes off. Like email the new information to someone (receiving the acknowledgement)..

Is this right? And when you talk about check boxes in the option group, I'm assuming, too, that this will allow me up update the stati on more than one status level simultaneously, unlike an option group with radio buttons, which will allow me to update just one status at a time

And the switch button... this would be the same as a commandbutton

Thanks
Dere

----- John Vinson wrote: ----

On Wed, 26 Nov 2003 11:56:04 -0800, "Derek Wittman
I'm working on a form that offers check boxes for the selection of records to be updated to a new status level (from "Requested" to "Acknowledged"). If a box remains unchecked, the record is not to be updated. I'd like to do this without the update query, if possible, so I don't have to make a new update query for each update occurrence (after Acknowledged comes Scheduled, Completed, Approved, and Finalized). I want to just do these via macros, applyfilter actions, and hopefully SevValue actions. I've got it running, but it's only updating the current record. How can I get it to apply the update to all the records in the filter? Would a datasheet view do it, or a subform? I'd rather not use the subform (but I will if there's no other option) because I like the formatted fom. I've got no Access VBA coding experience

An update query is the only good way to do this - but you only nee
one of them, not four. You can update the status field t

=Choose(Forms!yourform!chkScheduled = True, "Scheduled"
Forms!yourform!chkCompleted = True, "Completed",
Forms!yourform!chkApproved = True, "Approved"
Forms!yourform!chkFinalized = True, "Finalized"
True,[Status]

Better might be to put the four checkboxes in an Option Group contro
which will return a number 1, 2, 3 or 4 and use the Switch functio
instead (see the online help)

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=publi
 
Back
Top