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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning a default value to a checkbox via code

Status
Not open for further replies.

bujin

MIS
Oct 2, 2000
144
GB
I have an unbound checkbox on an Access form and I want to set it's default value to FALSE. In the past, I have been using Access 97 and it's accepted:

CheckboxName.Value = False

Now, I am using Access XP and trying the same thing gives me the RTE '2448' message:

"You can't assign a value to this object."

So how do I do it then?

(BTW, the college, in it's wisdom, has recently upgraded to Windows XP and the help files have not been installed!)
 
Hiya,

Sorry - I don't know the answer (nor do I have XP).

After searching the MS knowledgebase I got this from a search for 2448 concerning XP:


May or may not be relevant, but if you do a search of the knowledgebase you'll probably get the answer that you want, and it'll probably involve a windows update or service-pack install.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Ah yes! The knowledgebase! I'd forgotten all about that! Cheers!
 
Hmm... doesn't help much. Only reference to RTE2448 is to do with BuildCriteria. Ah well...
 
Try these variants:

me!CheckboxName= False
me!CheckboxName.Value = False
me!CheckboxName= 0
me!CheckboxName.Value = 0


 
I've just found the problem. I was trying to assign the values to checkboxes created within a frame. I deleted them and created them outside the frame, then dragged them into the frame and now it accepts the value.

Gareth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top