Selecting only one in a group of yes/no fields?

G

Guest

I am creating a database for a retail store. For every product, there are
multiple vendors. I have designed a table and form with product info
(Inventory Number, Descrption, U/M, etc.) and a subtable and form with vendor
info including item cost. Since there are multiple vendors for most products,
I added a yes/no field. Right now, the subform is a datasheet, and when
Primary Vendor (Yes/No) is selected, that vendors cost is used for the
products price calculations. The problem is i can select multiple vendors as
primary. How can I make it so only one of the vendors can be checked at one
time?
 
S

Sergey Poberezovskiy

A few options:

1. Instead of using Yes/No field put a combobox on the
form that allows to select Primary Vendor;

2. On your Yes/No checkbox/option group put a warning on
BeforeUpdate event if Primary Vendor has already been
selected for the Product stating that this will replace
existing Primary vendor; and if user chooses not to
proceed with the change, you can always cancel the event.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top