Getting a Check Box ticked on form load?

C

Chrisso

Hi All

I have two Check Boxes on a form. When the form loads I want one of
the Check Boxes to be selected by default.

I added this code to my Form_Load() sub:

Me.chkALL.Value = True
Me.chkANY.Value = False

However all I get back is run-time errors - "You cannot assign a value
to this object"

How do I achieve getting one Check box ticked and the other un-ticked
on form load?

Thanks in advance for any ideas,
Chrisso
 
J

Jeff Boyce

Chrisso

Are these "mutually exclusive" choices? That is, can you only have one of
them checked? If so, consider using an option group rather than a pair of
check boxes. The implication of a pair of (or 10) checkboxes is that zero,
one or many may be checked.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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