Query for Combo Box Selections

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello -

Please bear with me as I am an amateur!

I have a form that has a
subform that contains a combo box. A user can select numerous items from the
box (it is set up as a "continuous" combo box so that there can be many
choices selected - the choices are displayed in separate fields on the form).
My problem is that I need to create a query that will take the selections
that are made by the user (for example, if the user picks "weakness",
"nausea" and "chest pain" as three of their choices), the query should take
those three choices, treat them as "keywords" that will then return results
from another table. For example, the words weakness, nausea and chest pain
will be somewhere in the description field in the "Diagosis" table. Thus,
the "symptoms" will bring back the result of "Heart Attack" or "Acid Reflux",
etc... There could be many diagnoses that fit the symptoms. First, I'm not
sure how to link the Symptoms and Diagnosis tables, and secondly, I don't
know how to write the query that will return the results that I need. I hope
this makes some sense. Can anyone help?
Thanks in advance!
 
Ann,

There is no such thing as a "continuous" combo box, what you are referring
to is either a continuous subform, or a listbox. How to handle these
situations depends on which of these circumstances you have. It will also
depend upon the structure of your Diagnosis and Symptoms tables, and whether
this application is being run as a "stand-alone" or "networked" application.

None of these are extremely diffucult tasks, so if you can provide a little
more information regarding your table structure (the names and datatypes of
the fields in your tables, and whether this will be a networked application
or stand-alone, I think we can probably help.

Dale
 
Don't worry about the GUI as yet.

After clarifying what you / the users required out of the database, the
first step you need to do is to design the Table Structure that can hold the
data to satisfy the users' requirements. The GUI / Form designs depend a
lot on how you structure the data. So at this stage, I think you need to
think of how many Tables you need and how all of these Tables are linked
together. Generally, you need one Table for each entity in your database (I
guess 3 at least: Patient, Symptom and Diagnosis). You then may need
addtional LookUp Tables as well as Link / Resolver Tables in case of
Many-to-Many relationships.

For what you wrote, I think the Symptom and Diagnosis are linked in a
Many-to-Many relationship since a Symptom can be caused many possible
Diagnoses and a possible Diagnosis can have many different Symptoms.

Suggest you check Access Help / your Access book or general database design
theory first about Many-to-Many relationship and how to can structure the
database to handle this efficiently.

The user interface will come naturally after you have a concrete Table
Structure ...
 

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

Back
Top