check all yes/no boxes

D

Dave

Access 2003

I have a form that has 3 "yes/no" boxes on it (it will eventually have 8 or
10 but the approach should be the same)

I have a button on the form that when clicked should "check" all the
checkboxes.

This is my code on my button but it is only checking the first check box.

Private Sub cmdSelectAll_Click()
Me.Transcripts = True
Me.Application = True
Me.Agreement = True

End Sub

Any suggestions what I am doing wrong?

Thanks for looking

Dave
 
D

Douglas J. Steele

What do you mean by "the first check box"? Are you talking about a
continuous form, and it's only checking the check boxes on the first row
(that's all your code will do: check the boxes on the current row), or do
you mean you've only got the three check boxes on the form, and only one of
the three is actually getting checked?

If the latter, are you certain you've typed the control names correctly?
 
J

John W. Vinson

Access 2003

I have a form that has 3 "yes/no" boxes on it (it will eventually have 8 or
10 but the approach should be the same)

I have a button on the form that when clicked should "check" all the
checkboxes.

This is my code on my button but it is only checking the first check box.

Private Sub cmdSelectAll_Click()
Me.Transcripts = True
Me.Application = True
Me.Agreement = True

End Sub

Any suggestions what I am doing wrong?

For starters, using an incorrect table structure.

"Fields are expensive, records are cheap". Storing data in fieldnames
(Transcripts, Agreement) etc. is a very common trap, but one that you'll rue
forever. When you need to add a new step, what will you do? Add a new field to
your table, redesign your form, rewrite all your queries, restructure all your
reports...? OUCH!

If you have a one (application) to many (checkpoints) relationship, model it
as a one to many relationship with one *RECORD* per checkpoint. If you could
post some more information about your table structure and the nature of the
problem someone should be able to help come up with a properly normalized
design.
 
D

Dave

Doug,

Sorry if I was not clear about the problem.
As it turns out my problem was due to using a field name that was reserved
(Application).
After changing that, all is good.

Thanks for replying

dave
 
D

Dave

John,

To be honest - I got lost in the "advice" you were attempting to provide.
That aside - my first mistake was using a field name that was reserved
(application).
Upon changing that I am getting the results I wanted.
Thanks

dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top