option box

N

ngan

1. If a user can choose multiple items in an listbox, how can I save that
information in one field? I don't want to create a yes/no field for every
option.

For instance, a company can be several types and they can choose from 5
types. I rather not have a a subtable to store the info. I rather have it
store in one field. Or do you suggest I go with the subtable or field for
each option?

2. I want to set up a search option to look for taxi companies based on the
cities they serve. For instance, a company can handle all of LA county.
That would mean having to list all of the cities within LA county. Another
company could deal with most, but not all cities in the county. Would that
mean having a subtable to list all of the cities the company deals with? Is
that too over the top?

Thanks.
 
T

Tim Ferguson

1. If a user can choose multiple items in an listbox, how can I save
that information in one field? I rather not have a a subtable to
store the info.

Bad luck: there are forty years of mathematical research behind R theory,
and it all adds up to storing exactly one fact in exactly one field. You
need another table to implement a straightforward one-to-many
relationship. One more record in the table for each item chosen.
2. I want to set up a search option to look for taxi companies based
on the cities they serve. For instance, a company can handle all of
LA county. That would mean having to list all of the cities within LA
county. Another company could deal with most, but not all cities in
the county. Would that mean having a subtable to list all of the
cities the company deals with? Is that too over the top?

Sounds like you have three different entities: you have Cities, and
TaxiCompanies, and Coverages. They would look like:

Cities
======
Abingdon
Berkely
Charlesworth
Denver
Edinburgh


TaxiCompanies
=============
One-Tax
TooCall
ThreeState
ForSure

Coverages
========= ============
One-Tax Abingdon
One-Tax Charlesworth
TooCall Abingdon
TooCall Denver
ThreeState Edinburgh
ForSure Abingdon
ForSure Berkely
ForSure Charlesworth
ForSure Denver
ForSure Edinburgh


and so on.

Hope that helps


Tim F
 

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