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

Continuous form and check box

Status
Not open for further replies.

GibFinch

Programmer
Sep 14, 2004
6
US
I have a continuous form in a subform that lists all vendors for a certain product. I would like to put a check box beside each vendor so I can choose a default vendor for that product. When I do, however, it will let me choose none, one, or all of the vendors. Is there any way I can get it to choose either none or just one of the vendors for that product?
Thanks for any help,
Gib
 
Only if the checkbox is bound to a field in a table.
 
You could do something in the OnChange event of the checkbox to:

1) Check to see if the value has been set to true. If not, exit.
2) Open a RecordSet and set the field to false for all records except the currently selected record.
3) Update the data on the form.

Warning: This is not very practical for large data sets.
 
It is bound to a field in my table. The problem is when I have more than one vendor for a product, it will allow me to choose yes for more than one of them. I want to limit this to just one of the vendors for that part. Is it something I need to do in the table, rather than on the form?
 
I think KornGeek has answered this. Yes no?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top