469,899 Members | 1,489 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,899 developers. It's quick & easy.

combo box display

Is there a way to set up a combo box so that when the user clicks the arrow,
the list is populated with info from a specific field from a table but once
they select an option, data from another field gets displayed in the box? In
other words, when the user selects the drop down list, I want a them to see
a list of full titles for them to select. Once they click on a title,
however, I want an abbreviation to get put into or displayed in the box. So
a record in the table might read:

ID Title Abbreviation
1 A Full Title Is Here Full Title

So, user opens the list box and sees "A Full Title Is Here", they click on
that text and "Full Title" appears in the closed combo box.
Aug 30 '06 #1
1 2048

Jimmy Stewart wrote:
Is there a way to set up a combo box so that when the user clicks the arrow,
the list is populated with info from a specific field from a table but once
they select an option, data from another field gets displayed in the box? In
other words, when the user selects the drop down list, I want a them to see
a list of full titles for them to select. Once they click on a title,
however, I want an abbreviation to get put into or displayed in the box. So
a record in the table might read:

ID Title Abbreviation
1 A Full Title Is Here Full Title

So, user opens the list box and sees "A Full Title Is Here", they click on
that text and "Full Title" appears in the closed combo box.
im a little unclear as to what your trying to do, but i have an idea.
There are several ways you can accomplish this. One way is to add
another field to your table that contains all of the abbreviations, and
then on your form, add a combo box and select the option that says
'Find a record on my form based on the values i select from my combo
box' then go through the wizard and for the combo box values move your
title field into the combo box. Once you finish adding the combo box,
go to the field list on the main access window (View>Field List) and
then drag your 'Abbreviation' field onto the form. Then as you select
items from the drop down list, the abbreviations will appear in the
box.

another way to do this, which will cut down on the amount of data
stored, and it also won't make you go through and enter all the
abbreviations is as follows:

Private Sub Combo1_AfterUpdate()
Dim strCombo as string

strCombo = Me.Combo1

Me.Box1 = Mid(strCombo,3,Len(strCombo)-10)
End Sub

This will do the trick, however it only works if the extra words are
always teh same in the title. (i.e. The words getting trimmed off are
always 'A' and 'Is Here') Because of this, i would recommend the first
way, with entering the specific fields in the table.

Aug 31 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Inquiring_Mind | last post: by
10 posts views Thread by Richard | last post: by
1 post views Thread by =?Utf-8?B?bWZt?= | last post: by
2 posts views Thread by biganthony via AccessMonster.com | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.