Combo Boxes that link to Text Boxes

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

Guest

Hello All!!

I have a combo box located in one of my forms in Access 2002 with the "Row
Source Type" set as Value List, basically displaying two columns and three
rows. The information that is displayed, or dropped down when you click it,
is S for SCREENING, C for COUNSELING, and CP for CHEMOPREVENTION /
IMMUNIZATION. Whenever the user makes his/her selection, we will say "S" for
screening, the "S" actually gets recorded in the table.

I would like to fix it to where the meaning of these letters gets displayed
right next to the combo box. In other words, if I were to select "CP" in
this combo box then the description of "CHEMOPREVENTION / IMMUNIZATION" gets
displayed to the right of this combo box.

I am assuming that these descriptions would go in a text box? I was playing
around with some code but before I mess anything up further, I wanted to
consult some experts!

I hope I didn't confuse any of you. Any help that you could possibly give
to me would greatly be appreciated!! :-) Thank you!!

Sincerely,

Wayne
 
Hello All!!

I have a combo box located in one of my forms in Access 2002 with the "Row
Source Type" set as Value List, basically displaying two columns and three
rows. The information that is displayed, or dropped down when you click it,
is S for SCREENING, C for COUNSELING, and CP for CHEMOPREVENTION /
IMMUNIZATION. Whenever the user makes his/her selection, we will say "S" for
screening, the "S" actually gets recorded in the table.

I would like to fix it to where the meaning of these letters gets displayed
right next to the combo box. In other words, if I were to select "CP" in
this combo box then the description of "CHEMOPREVENTION / IMMUNIZATION" gets
displayed to the right of this combo box.

I am assuming that these descriptions would go in a text box? I was playing
around with some code but before I mess anything up further, I wanted to
consult some experts!

I hope I didn't confuse any of you. Any help that you could possibly give
to me would greatly be appreciated!! :-) Thank you!!

Sincerely,

Wayne

Add an Unbound text control to your form.
Set it's control source to:
= ComboName.Column(1)
 
For purely informational things like a description; where your combo box shows "S" and you want to display "Screening" next to it so the user knows what "S" stands for, I like to use a label instead of a textbox. I find textboxes look "clunky" and you have to change all the properties to turn off the background, the "sunken" look, turn off tab stops, disable them, etc., etc.

Just add a label next to the combobox; type anything you want for the caption. For the combobox's afterupdate event and the form's oncurrent event use:
Me.LabelName.Caption = Me.ComboName.Column(1)
 
Why not have the options in a table and use a query so that you
present SCREENING, COUNCELLING, CHEMO.. etc and when the user selects
one the relevant code is bound to the field?. The combo wizard will
build the properties for you.


Hello All!!

I have a combo box located in one of my forms in Access 2002 with the "Row
Source Type" set as Value List, basically displaying two columns and three
rows. The information that is displayed, or dropped down when you click it,
is S for SCREENING, C for COUNSELING, and CP for CHEMOPREVENTION /
IMMUNIZATION. Whenever the user makes his/her selection, we will say "S" for
screening, the "S" actually gets recorded in the table.

I would like to fix it to where the meaning of these letters gets displayed
right next to the combo box. In other words, if I were to select "CP" in
this combo box then the description of "CHEMOPREVENTION / IMMUNIZATION" gets
displayed to the right of this combo box.

I am assuming that these descriptions would go in a text box? I was playing
around with some code but before I mess anything up further, I wanted to
consult some experts!

I hope I didn't confuse any of you. Any help that you could possibly give
to me would greatly be appreciated!! :-) Thank you!!

Sincerely,

Wayne

Please remove obvious from email address if emailing.
 
You know I actually did that in the past but I had or have so many tables, I
get confused easily.

Don't get me wrong; I want to make this database as user friendly as
possible, but retaining my sanity at the same time.

I might just go ahead and put them all in a table anyway.

Where did you guys (and gals) learn this stuff? I learn bits and pieces of
different things from trial and error. Mostly error. :-)

Anyway, thanks for all yall's help! It is greatly appreciated.

Wayne
 
The big benefit of that approach is maintainability.

If you suddenly have another category especially if it is used
elsewhere, then just by adding it to a table it will be offered to the
user. Otherwise you have to go around the forms and add it in each
time. Value list is great for stuff like Yes & No.

Remember you do not need a table for each category. Create a codes
table and put them all in there, then just query for the code type.

EG.

Code_Type Code_ID Code_Text
MEDICAL S Screening
MEDICAL C Counselling
MEDICAL CP Chemoprevention/Immunisation
LOCATION L Lubbock, Texas
LOCATION P Philidelphia

Then use the query to pull off all the records for a particular code
type.

Trial and error is right. i'm only just starting to use Access after
programming and using Foxpro for a few years, so while I know what I
need to do, it is how to do it in Acess that baffles me.:-))


You know I actually did that in the past but I had or have so many tables, I
get confused easily.

Don't get me wrong; I want to make this database as user friendly as
possible, but retaining my sanity at the same time.

I might just go ahead and put them all in a table anyway.

Where did you guys (and gals) learn this stuff? I learn bits and pieces of
different things from trial and error. Mostly error. :-)

Anyway, thanks for all yall's help! It is greatly appreciated.

Wayne

Please remove obvious from email address if emailing.
 
Very Interesting! I didn't think of that. That would be much more efficient!

I do know that I record all these helpful tips in my own little database for
future reference!

One more question and I apologize for not asking this as a new question/post
but do you know if I would be able to enable/disable or manipulate a
control's value/properties, located in a form, but by doing all this from
another form (within the same database of course)? You just seem very
resourceful and know exactly what you are talking about and I understand you!
Thanks a million!!

Wayne
 
Back
Top