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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make check boxes into record selectors

Status
Not open for further replies.

Mtlca401

Programmer
Mar 18, 2003
42
US
I have a continuous form with a check box on it and would like to make that check box a record selector. Right now I have that check box set to a yes/no field in a table. I am trying to make a select All/Clear All button too that kinda works like hotmail does(where it selects all even if any are selected, then if pressed again it clears all, Probably would have to use a toggle button). I can only get it to clear or select the check box on the current record though, I guess it has something to do with the continuous form. I also tried to set the check boxes to "no" or a a null value each time you exit the form but that didn't work either. Is their maybe another way, like not using a yes or no field?
 
Hi

Do not see any reason why you cannot use a yes/no or check box

In the 'Unselect' button on click put

Dim Rs as DAO.Recordset
Set rs = Me.recordsetclone
rs.MoveFirst
Do until Rs.EOF
Rs.Edit
Rs!blnSelect = False
RS.Update
rs.MoveNExt
Loop

simialr code but TRue in the select button on click event should do it
Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Another option would be to use an update query that sets the appropriate field to True or False. This would be the method I would use because I am not yet comfortable with using recordsets.

This is not to discount Ken's idea, but instead to suggest an alternative to those who (like me) are still venturing into new territory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top