Checkbox in Access 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have to work with Access 2000 and I get an error when trying to set a
checkbox value in the form Load event or when the form is loaded and the user
clicks on a command botton.
' **************************
Me.chkTest.Value = -1
Me.chkTest = -1
Me.chkTest = True
Me.chkTest.Value = False
' **************************
I get the message: Property not defined...
Is it that in Access 2000, one cannot use the .Value property of a checkbox
control?
If that is the case, what is that control doing in the toolbox and how is it
supposed to be used?
Any help will be appreciated.
 
You can use the .Value property for a check box in VBA; however, it is not
necessary as it is the default property, so
Me.chkText = True is the same as Me.chkText.Value = True

I am not sure why you are getting the problem in the Load event of the form.
I thought the property references had been established by then. Is there
any reason you can't just set the Default Value property of the check box to
what it needs to be when you open the form?
 
Hi Klatuu,
I do not know what happened but I could not see the .Value in the property
list and I got error messages when I typed it in the code window. I deleted
the two checkboxes and replaced them with a listbox.
Then I tried again with a checkbox and suddenly, I could access the .Value
and set it as I wish.
The problem is over now.
Thank you
 
Good point. I worked late too. Maybe tonight will be less painful.
Thank you for your encouragement.
 
Back
Top