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

Ticking all checkboxes on a datasheet

Status
Not open for further replies.

redbase

Technical User
Nov 21, 2002
21
GB
I have a datasheet which shows hundreds of records. One of the fields in each record is a checkbox. I am looking for a way of ticking and un-ticking all checkboxes on the datasheet simultaneously using a command button. Please can anyone help me out with the code?

Thanks


 
Do it with a cmdButton.

sub click_command0

dim rs as dao.recordset

set rs = me.recordset
rs.movelast
rs.movefirst
do while not rs.eof
rs.edit
rs.click0 = yes
rs.update
rs.movenext

loop
'close out properly and requery your form. If you wish an example email me and ask, descibing what you wish to do.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top