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!

How to set default value of check box or radio button 2

Status
Not open for further replies.

ScottXJ

Programmer
Aug 14, 2002
51
CA
Hi,

I have a simple Access 2000 form in which I would like to set the default value of a check box or radio button to checked/on. I have tried setting the default value in the properties of the object to Yes, True, 1, to no avail. The form still does not display the check box as being checked. The data type of the column to which this control is bound is Yes/No (boolean). What am I doing wrong here?

Any assistance would be appreciated.

Thanks,

Scott.
 
Since the field is bound to a record, the default properties of the field won't apply to existing records. It'll display the value already in the record.

For new records it should display the default in the form.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
traingamer - it does let you set it in the Form_Load event (but as you know this is basically programatically clicking it after the control has been loaded) but as you say unless you change the value of the checkbox after the event so to speak (i.e. after it has been populated by the records data) the field will display the records value.

Cheers

Harleyquinn

---------------------------------
For tsunami relief donations
 
Thanks very much Greg. I just noticed that when I removed the control source. I will do an update query to make all the existing records have a "true" entry for that field and then test it out by adding a new record to ensure the default value works.

Thanks again!

Scott.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top