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

Force user to Select yes or no for yes/no type field

Status
Not open for further replies.

StuMunro

Programmer
Mar 2, 2001
29
0
0
GB
I have a combo box linked to a yes/no field in the table, I want to force the user to chose "yes" or "no", by initially having the combo field blank on a new record, ie I dont want to just use a default of no.

I have tried various ways such as setting the rowsource property only when the combo receives the focus, this works for tabbing but if the combo is clicked a default is entered.

combo.rowsource = "yes";-1;"no";0

Can any one show me how to force the user selection on a new record?

Stu
 
Hi Stu,

Instead of setting the field with a default value, just try making it a not null field (i.e. will not accept a null value), then if the user does not select a value, it will generate an error until they do.

Tim
 
I have tried this with the Required property = yes on the table field but no difference. I think due to the nature of a yesno field it is automatically initialised to 0 (No)

Stu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top