Change selected records command button

MvP14

Registered User.
Local time
Today, 19:40
Joined
Apr 15, 2003
Messages
66
Hi everybody,

I would appreciate any help I can get on the following:

I have a form that is based on a query. What I would like to be able to do is to create a command button that allows me to change all the selected records at once.

e.g. one of the fields is a text box containing relevant codes (code1/ code2/ code3). Every so often, it happens that I need to add a certain code to several records. What I do until know is select the records that have to be changed, and then add the new code manually to every single record (so the text box changes to code1/ code2/ code3/ code4).

Is there any way to create a command button to change them all at once? I have tried using an update query (VBA), but I encounter the following problem: not always the same field has to be changed, and I don't just want the fields to be replaced by a new value, but rather that a value is added to the field.

Anyone any suggestions? Thanks in advance!
 
I don't see why this can't be done using two text boxes, one containing the name of the field to be updated and the other the string to be added to all selected fields.

How do you select the records?
 
I use a query.
 

Users who are viewing this thread

Back
Top Bottom