RE: Difficulty with form design
- From: Klatuu <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Dec 2006 06:00:00 -0800
Using two combo boxes like this is a fairly normal way to do what you want.
It is also not that difficult. The technique is known as "Cascading Combos".
The way to handle this is to filter the query that is the row source for the
second combo based on the value in the first combo. For example, lets say
you have a combo named cboCagegory (for the category of diagnosis), and the
second is cboSpecific.
You also need a table that contains a row for each category/specific.
The Category query would be something like:
SELECT Category FROM tblDiagnosisList;
The Specific query would be something like:
SELECT Specific FROM tblDiagnosisList WHERE Category = cboCategory;
Then in the After Update event of the first combo, requery the second combo
and it will contain a list of only the specific complaints related to the
category:
Me.cboSpecific.Requery
"etter34@xxxxxxxxx" wrote:
I'm trying to develop a form and I'm not quite sure what is the best.
way to proceed.
Any guidance / help would be appreciated.
I'm working with diagnoses and problems and need to track this
information based on a case by case basis (patients). The problem is
that cases / patients have multiple diagnoses and problems that need to
be inputted into a table linked to the main patient table.
What I thought of doing was having a subform with multiple comboboxes.
The first combobox would list broad caterogies of diagnoses (ie:
trauma, toxicity, metabolic, etc.); the next combobox would contain
more specific details within those headings. So if one chose trauma in
the first combobox, the second combobox would populate with items like
"fracture, laceration, luxation, etc." And the user could select them.
However, diagnoses can include multiple problems from the broad
heading.
Example:
Patient 1:
Trauma: Fracture, Laceration
Infectious Disease: Abcess, Sepsis
Patient 2:
Degenerative: Cataracts
Metabolic: Starvation
So that now when I change the first combobox, the second combobox
reacts accordingly and I lose the data.
I'm looking to record each problem in (probably multiple) fields so
that I can later run queries using either the broad category, or the
more specific one.
THe two combobox example might not be the best idea, so thats why I am
looking for help. I thought about making the second combobox a list
that could be used to populate another list that would save all of the
problems to the patients record.
I'm not sure how else to explain this without showing the database.
- References:
- Difficulty with form design
- From: etter34
- Difficulty with form design
- Prev by Date: RE: prefill a field into another form
- Next by Date: Re: anybody not use caculation
- Previous by thread: Difficulty with form design
- Next by thread: Re: Difficulty with form design
- Index(es):
Relevant Pages
|