List Box with Added Information

  • Thread starter Thread starter Susan K via AccessMonster.com
  • Start date Start date
S

Susan K via AccessMonster.com

I am a novice at Access and VBA, but I have been pretty successful with the
database I have been working on. What I would like to know, as I haven't
been able to find information about it on the internet, is if it is possible
to have a 2-column multiselect listbox where the second column allows you to
enter information next to the item you selected? I want to create a listbox
which lists various diagnoses and which would allow me to enter the date when
the diagnosis was made in the second column next to each diagnosis chosen.
If this is possible, how would I go about designing this?

Thanks!

Susan
 
It sounds like you probably have multiple diagnoses per patient or something
like that. What you could do is create a subform having a combo box
(Diagnosis, whose RowSource is valid diagnoses from a Diagnoses table) & a
text box (DiagnosisDate). It could also have a hidden text box (PatientID)
whose default value is this: =[Forms]![YourMainFormNameHere]![PatientID]

Set the parent/child link on the PatientID field so that the various
diagnoses & their dates are tied to the correct patient. This would, I think
achieve the result you are after.
 
Brian,

Thanks for getting back to me so fast! Yeah, in the time between my sending
this post and
your answering it I saw that I could do something like what I wanted to with
a subform setup.
I have already started it. I think I was going to go about it the a similiar
way but without the
Parent/Child link. What I wanted is three columns: Diagnosis, Date of
Diagnosis and Description.
What I was picturing is three controls--the Diagnosis listbox from the
Diagnosis table, a text box for
each of the other categories. Is there a way to line up, line by line, the
text box (making it look like an
empty list box where a person could enter information such as the date, etc.
on each line) with the Diagnoses. And I assume that I can do this same setup
for three controls as I would with two , right?

Also....I guess the same setup can be used for a two column subform using a
check list (allowing multiple choices) and a Description text box (Health
Issues as the list box)?

Man, designing web pages is much easier than this! :)

Susan
It sounds like you probably have multiple diagnoses per patient or something
like that. What you could do is create a subform having a combo box
(Diagnosis, whose RowSource is valid diagnoses from a Diagnoses table) & a
text box (DiagnosisDate). It could also have a hidden text box (PatientID)
whose default value is this: =[Forms]![YourMainFormNameHere]![PatientID]

Set the parent/child link on the PatientID field so that the various
diagnoses & their dates are tied to the correct patient. This would, I think
achieve the result you are after.
 
I am assuming that you have a table structure something like this:

Patients (with fields for PatientID & and name, etc.)
Diagnoses: (with fields for DiagnosisID, Diagnosis, & Description): this
contains all the valid diagnosis that can be used
PatientDiagnoses: (with fields for PatientID, DiagnosisID, and
DiagnosisDate, as well as comments?) This allows multiple diagnoses per
patient without constantly trying to change the patients table.

Instead of trying to use a list box, use a combo box (where the RowSource is
your list of Diagnoses) where you pick a single diagnosis. Enter its date in
the text box next to it, then proceed to the next line for a new
diagnosis/date combination.

On the subform (Recordsource: PatientDiagnoses table), I would set up the
form with the labels in the (sub)form header (Diagnosis, Date) a combo box
called Diagnosis (ControlSource: Diagnosis) in the form detail section under
the Diagnosis label and a text box DiagnosisDate(ControlSource:
DiagnosisDate) in the detail section under its label.

Assuming that a particular diagnosis/date combination applies to a patient,
you need to record the patientID on each line as well; thus the need for the
child/parent link. You could pick the patient on the main form, then drop
down to the subform to add/edit diagnosis/date combinations for that patient.
In order to get the patientID automatically recorded, look at my original
notes.

The child/parent link will ensure that you don't see everyone's diagnoses
when you bring up a particular patient.

This way,,

Susan K via AccessMonster.com said:
Brian,

Thanks for getting back to me so fast! Yeah, in the time between my sending
this post and
your answering it I saw that I could do something like what I wanted to with
a subform setup.
I have already started it. I think I was going to go about it the a similiar
way but without the
Parent/Child link. What I wanted is three columns: Diagnosis, Date of
Diagnosis and Description.
What I was picturing is three controls--the Diagnosis listbox from the
Diagnosis table, a text box for
each of the other categories. Is there a way to line up, line by line, the
text box (making it look like an
empty list box where a person could enter information such as the date, etc.
on each line) with the Diagnoses. And I assume that I can do this same setup
for three controls as I would with two , right?

Also....I guess the same setup can be used for a two column subform using a
check list (allowing multiple choices) and a Description text box (Health
Issues as the list box)?

Man, designing web pages is much easier than this! :)

Susan
It sounds like you probably have multiple diagnoses per patient or something
like that. What you could do is create a subform having a combo box
(Diagnosis, whose RowSource is valid diagnoses from a Diagnoses table) & a
text box (DiagnosisDate). It could also have a hidden text box (PatientID)
whose default value is this: =[Forms]![YourMainFormNameHere]![PatientID]

Set the parent/child link on the PatientID field so that the various
diagnoses & their dates are tied to the correct patient. This would, I think
achieve the result you are after.
 
Thanks again! You confirmed what I was thinking I had to do....and added to
it .I have exactly enough knowledge on my own to see in my head what I want,
but not enough to
smoothly implement it---at least, not without a lot of headbanging and
gnashing
of teeth! :)

Susan

I am assuming that you have a table structure something like this:

Patients (with fields for PatientID & and name, etc.)
Diagnoses: (with fields for DiagnosisID, Diagnosis, & Description): this
contains all the valid diagnosis that can be used
PatientDiagnoses: (with fields for PatientID, DiagnosisID, and
DiagnosisDate, as well as comments?) This allows multiple diagnoses per
patient without constantly trying to change the patients table.

Instead of trying to use a list box, use a combo box (where the RowSource is
your list of Diagnoses) where you pick a single diagnosis. Enter its date in
the text box next to it, then proceed to the next line for a new
diagnosis/date combination.

On the subform (Recordsource: PatientDiagnoses table), I would set up the
form with the labels in the (sub)form header (Diagnosis, Date) a combo box
called Diagnosis (ControlSource: Diagnosis) in the form detail section under
the Diagnosis label and a text box DiagnosisDate(ControlSource:
DiagnosisDate) in the detail section under its label.

Assuming that a particular diagnosis/date combination applies to a patient,
you need to record the patientID on each line as well; thus the need for the
child/parent link. You could pick the patient on the main form, then drop
down to the subform to add/edit diagnosis/date combinations for that patient.
In order to get the patientID automatically recorded, look at my original
notes.

The child/parent link will ensure that you don't see everyone's diagnoses
when you bring up a particular patient.

This way,,
[quoted text clipped - 31 lines]
 
You are very welcome. That's where I end up if I try to write a web page... :-(

Susan K via AccessMonster.com said:
Thanks again! You confirmed what I was thinking I had to do....and added to
it .I have exactly enough knowledge on my own to see in my head what I want,
but not enough to
smoothly implement it---at least, not without a lot of headbanging and
gnashing
of teeth! :)

Susan

I am assuming that you have a table structure something like this:

Patients (with fields for PatientID & and name, etc.)
Diagnoses: (with fields for DiagnosisID, Diagnosis, & Description): this
contains all the valid diagnosis that can be used
PatientDiagnoses: (with fields for PatientID, DiagnosisID, and
DiagnosisDate, as well as comments?) This allows multiple diagnoses per
patient without constantly trying to change the patients table.

Instead of trying to use a list box, use a combo box (where the RowSource is
your list of Diagnoses) where you pick a single diagnosis. Enter its date in
the text box next to it, then proceed to the next line for a new
diagnosis/date combination.

On the subform (Recordsource: PatientDiagnoses table), I would set up the
form with the labels in the (sub)form header (Diagnosis, Date) a combo box
called Diagnosis (ControlSource: Diagnosis) in the form detail section under
the Diagnosis label and a text box DiagnosisDate(ControlSource:
DiagnosisDate) in the detail section under its label.

Assuming that a particular diagnosis/date combination applies to a patient,
you need to record the patientID on each line as well; thus the need for the
child/parent link. You could pick the patient on the main form, then drop
down to the subform to add/edit diagnosis/date combinations for that patient.
In order to get the patientID automatically recorded, look at my original
notes.

The child/parent link will ensure that you don't see everyone's diagnoses
when you bring up a particular patient.

This way,,
[quoted text clipped - 31 lines]
diagnoses & their dates are tied to the correct patient. This would, I think
achieve the result you are after.
 
Back
Top