Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select all button to check all checkbox

Status
Not open for further replies.

EBee

MIS
Aug 10, 2001
229
US
I have a continues form that have checkboxes that is attached to a qry. I need to create a button to check all the checkboxes. Since the checkboxes are not bounded, I have not idea how to code it.

Any help or direction is greatly appreciated

ET

 
First you say you have checkboxes attached to a query (Bounded), then you say they are Unbounded. Which one?????

If they are Unbounded (in design view, click on the checkbox, bring up its' property sheet, click the All tab and look at the option Control Source. If the box next to it is empty, then it is unbounded), then create a command button, on its' property sheet click the Event tab, click next to the option OnClick, click on the button with three dots, select Code Builder. Then just type in between Private Sub and End Sub:

Me![Check9].value = true

Replace Check9 with the name of your checkbox.
 
? if they are unbound ...

... all checked or unchecked in a continuious form ...

bound ones are a more hassle. if the "qry" create the field, then they are a bit more useless, as they only exists for the duration of the existance of the recordset and are (at best) difficult to access. ones bound (in the query) to a table type field require a mechanisim to reference the field. this could reasonably be be an update query with the selection xruteria the same as the recordsource of the form, but then it would cretainly inhibit the use of the table in a split/BE database. somewhere in hte nmuddle of these thoughts, it occurs (to me that) I do not know enough about the bigger picture to actually provide much more than the thought that it is at not as simple as it might seem and more background might be useful




MichaelRed


 
Thank you for your response. . I end up creating an update query, then, added this code with the refresh at the end for dynamic form update.

Private Sub cmdSelectALLMail_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qrySelectAllMailLocalSub", acViewNormal
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70 ' refresh VBA code
DoCmd.SetWarnings True
End Sub

Again, thank you for the assistance
ET
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top