469,287 Members | 2,666 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,287 developers. It's quick & easy.

"Check all" button checkboxes in MS Access

15
Hi,

I have a "continuous" subform which is linked to a table which has a checkbox field. I would like to create a Check All/Uncheck All checkbox control that both checks and disables the checkboxes in the subform.

At the moment I can disable/enable all textboxes, however my coding only checks/unchecks the FIRST checkbox in the subform, and ignores the other checkboxes in the list. My current VBA code is:

Private Sub Check5_AfterUpdate()
If Check5 = True Then
Aust_Ent_Sum = True
Aust_Ent_Sum.Enabled = False
Else
Aust_Ent_Sum = False
Aust_Ent_Sum.Enabled = True
End If
End Sub

"Aust_Ent_Sum" is the name of the checkboxes i want to check. Any help in checking/unchecking ALL the checkboxes would be appreciated!

Thanks, Siwei
Apr 3 '07 #1
4 10767
ChaseCox
294 100+
I answered a similair question here,

The Scripts
Apr 3 '07 #2
chengsi
15
ChaseCox,

Appreciate your reply, however my issue is that the number of checkboxes are not fixed as they are determined by the number of entries in the table (which is dynamic). Also, the checkboxes do not have individual names as they are essentially one control (i.e. Aust_Ent_Sum) being used to represent the entire field in a continuous form.

I had been thinking maybe some sort of loop is required in VBA, but not sure. Anyone have any suggestions?

Thanks, Siwei
Apr 4 '07 #3
ChaseCox
294 100+
ChaseCox,

Appreciate your reply, however my issue is that the number of checkboxes are not fixed as they are determined by the number of entries in the table (which is dynamic). Also, the checkboxes do not have individual names as they are essentially one control (i.e. Aust_Ent_Sum) being used to represent the entire field in a continuous form.

I had been thinking maybe some sort of loop is required in VBA, but not sure. Anyone have any suggestions?

Thanks, Siwei
Are you actually creating them as you go along? if so how is that done?
Apr 5 '07 #4
mrowe
7
Try looking at the following post:
http://www.thescripts.com/forum/showthread.php?p=2449139#post2449139

I believe you are having the exact same problem that someone else helped me solved.
Mark
Apr 5 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Askari | last post: by
3 posts views Thread by Not Me | last post: by
7 posts views Thread by Jaime Stuardo | last post: by
4 posts views Thread by Pandu | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.