Button update check box to true for all records in subform query

MattCass87

New member
Local time
Today, 18:03
Joined
Sep 4, 2017
Messages
8
Hi

Please see attached table layout and form.

Not sure if I need VBA or can complete this via an update query, i've seen conflicting options on the web.

I want that command46 button when clicked to change the status field checkbox of each ElementID in ItemDetails table to true

but, only to the ElementID associated to the ItemID's and PartID displayed in the form

Thanks in advance.

Thanks

Matt
 

Attachments

the query that shows the items in the form,
Make an update query that uses THAT query to modify the checkboxes.
 
I would use an update query unless you find that its read only.
Create a select query filtered to one item as a test.
Check whether you can edit the status manually.
If you can, change it to an update query
 
Thanks all for the pointers, it really helped and I've cracked it! :)

I created a SELECT query to gather all elementID, itemID, PartID and status of each element.

I then added in the criteria for PartID to look at the PartID of the form previously attached. [Forms]![Formspecified]![PartID]

this then pulled the correct elements from that partID.

I then turned this into a UPDATE query.
 
I want that command46 button when clicked

As you get into using VBA with access, you'll find that leaving default names like this will become terribly un-useful. I'd suggest getting in the habit of using a naming convention for these kinds of controls now rather than later.

Btn_CheckAll will make far more sense to you a month from now than command46.

A good naming convention often consists of identifying what type of item you are referencing followed by a descriptive name. I generally use three letters for controls and one or two to identify queries, reports, forms, or tables.
 

Users who are viewing this thread

Back
Top Bottom