Update multiple records at once, from a form

Lyconal

Registered User.
Local time
Today, 00:35
Joined
May 18, 2009
Messages
35
Hi,

I need to create a form that can do the following:

1) Show multiple records per form (Like datasheet view maybe?)
2) I require to have a checkbox work 'independantly' of each record, without being a field within that table

The reason for this, is that I want the following to happen:

Open Form and records based on Query are dispalyed.

Enter tracking details into 2 unbound text boxes, and then tick each record that is included with this shipment. Then on cmdclick, SQL update the records selected with the tracking information.

Anybody any suggestions on the best way of acheiving this?

Cheers
 
You will not be able to do that with an unbound checkbox (on a continuous or datasheet form). If you try it, you'll find that checking any record checks them all. From the sound of it, I'd probably use a multiselect listbox instead.
 
The multi-select list box works a treat :)

Many thanks,

P.S - Does anybody know how to select all records from a continous form for an UPDATE query?

Cheers
 
Presuming the form was filtered in some way, apply the same criteria to an UPDATE query. If that's not practical, you can open a recordset on the form's source and update them one by one.
 
I have tried to same criteria, but it doesnt seem to want to work (Only for the 'selected' record)

I basically want to update any of the records within the recordset, where the field "Sent" has the value "Yes", with the Tracking info from the unbound boxes above.
Like I say, it works for the selected record, but would like it to be automated for all records currently shown in the continuous form (With source of a query)

Cheers
 
Like I say, it works for the selected record, but would like it to be automated for all records currently shown in the continuous form (With source of a query)

currently shown - do you mean actually visible, rather than all records included in the forms recordset? if so, then pretty hard to do, i would have thought - maybe not possible
 
Well its a continuous form based on a query, so shows all records on the form.
 
Hi Lyconal,

is it possible for you provide the code for the above. I am also trying to to the same.

I am able to get the records in a subform now I want only the selected records should be updated. The field to be update remains same i.e Static.

Please guide.

Regards
Sudhir
 
Last edited:

Users who are viewing this thread

Back
Top Bottom