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!

Checkbox access 4

Status
Not open for further replies.

JoanaSantos

Programmer
Feb 24, 2015
33
EU
Hi,

i have a form with three checkbox, for example:

(Check8)
(check9)
(check10)

and i have a button "select" to select all the checkbox. I inserted the code:

Me.Check10 = true

i have tried too Me.Check10 = 1

but when i press the button appears the following mistake:
"run-time error'-2147352567 (80020009) you can't assign a value to this object"


what is the problem? i need to change something in form properties ?
 
Is it vba userform? Is the code in form's module? If so, both should work unless you have other source of error. Try to set VBE error trapping general options to "break on all errors".

combo
 
I would also avoid using default properties, even thou Access (and other MS Products) will allow you to do so.

I would do: [tt]Me.Check10[blue].Value[/blue] = True[/tt]

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Is this Microsoft Access? Did you wrap your check boxes into an option group? If in an option group/frame, you can only select one and it is set based on the value of the option group/frame.

Duane
Hook'D on Access
MS Access MVP
 
Me.Check10

Where is this code?

What is "Me" from the code's perspective?

Replace "Me" with a full and explicit reference.
 
i already did. now im using the checkbox from active control and its working
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top