Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox nightmares
Message
De
31/12/1999 10:27:16
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00310817
Message ID:
00310897
Vues:
26
Steve-

> But I think you understand my problem.

You bet. It's a pretty common design issue, IMO. User's might want to look up data based different ways.

One system I built had two distinct audiences. One knew the data based on a base-wide building name and the other knew it based on a Navy-wide facility numbering system.

Both needed to be able to drop down which ever list made the most sense to them at the time. For example, a high-level person might be on the phone with somebody from a base, and they'd need to look up a building based on the user's POV. Anyway, the cleanest thing I could come up with was two combos (as I mentioned in my earlier post).

> The descriptions in column 1 all start with a word such as
>"Truck 18" or "Pumper 22" or "Engine 44" like how Fire Department vehicles are identified. And I save a code from column 2 in my table. Like code "0062" is for "Truck 18", code "0024" is for "Pumper 22".

Is your database normalized? IOW, do you have a table of equipment type, with a code
An equipment type table with two fields: PK (surrogate keys), description (pumper, truck).

An equipment table with two fields: PK (surrogate keys), Type (FK from the equipment type table), name (pumper 22, truck 18), code ('0026', etc).
Is that at all close to how it looks?

>But the reason I don't get confused when the user types in a value into the combobox, it is because the user types a number only such as "414" or "79" or "191" which represent ambulance vehicles.

What if they change how they label their equipment? < s> You're still "overloading" the input box. IMO, one control should input one bit of data (from the user's POV).

>You know what, I think I just found the problem as I am typing this response. I should be saving column 1 in my table instead. I see you point about typing a number and getting it confused with a code because they could be equal.

Actually, I think that what you should be storing is the foriegn key from the equipment table, which itself is related back to the equipment type table based thru another foreign key.

Keep me posted.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform