473,770 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2259

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_AfterUpd ate()
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3013
by: Dave N | last post by:
I have a combo box that displays the names of all the users in my "Users" table. I set the RowSource to a Query from the "User" and "Project" tables. I can select any name from the list and that name comes up in the combo box on the form. Everything works fine this way I just want to automatically put the user name in the combo box display. Is there a way to automate displaying a name in the combo box without having to use the drop...
1
2714
by: Robert Neville | last post by:
The solution to my dilemma seems straight-forward, yet my mind has not been forthcoming with a direct route. My Project form has a tab control with multiple sub-forms; these distinct sub-forms relate addresses (multiple addresses); companies, contacts, and tasks to each project (one to many). My challenge lies with the task sub-form which links to the Project form through ProjID. The task record links back to the respective master...
2
1762
by: Inquiring_Mind | last post by:
i am creating a database. i have the following question.. as per the specs... i need to be able to pull other forms from the master form using either a list or a combo box. what is the difference between the two and the pros and cons how do i make each of them so that when i chose a name of a form it pulls it up with the information regarding that record (employee)
10
1912
by: Richard | last post by:
I have created a form which sets up a dataview. The form views one record at a time using a currencymanager. This works fine. All my text boxes bind. However I have a combo box which gets its lookup values from another (Advertising) table (AdvertisingID, Advertising). This works .. However, where it doesn't work as well is when the form loads, the combo boxes should bind to the AdvertisingID field and display the respective data.
10
9575
by: lorirobn | last post by:
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions, not ID's, so I have to convert the ID's from various lookup tables. The combo boxes work fine except for subcategory, which is dependent on category. Depending on category, the drop-down box for subcategory will display different items. (for...
10
7252
by: thh108688 | last post by:
Hi all, I have got a question here perhaps someone can provide me some good information or suggestion. In the Access Form I have created 2 combo box one is Activity combo box, the other is Condition combo box. When i select on Activity combo box value, my Condition combo box will display all the descriptions of the Condition corresponding to the Activity i have selected. ( this is what i wish to get) The problem i have encountered is...
1
2580
by: =?Utf-8?B?bWZt?= | last post by:
I have recently migrated to VS.Net 2005, and I am struggling to do something very basic with the combo box. I want to manually loop through a data table and add both the display text and the value manually. The reason I cannot bind the combo box to my data table is that there are more than one field that I want to combine to be the display member. So what I had to do was create yet another data table at run time (or an array list) and...
1
2908
by: Dave | last post by:
Hello all, First I'd like to apologize...This post was meant to be put in my previous post, but I tried many times without success to reply within my previous post. Now here goes... I have a main form (RD Form) with 4 combo boxes (i.e. cbo1, cbo2, etc) and a subdatasheet (the subform...let's call it subInfo) below the combo boxes on the RD Form. I hope this eliminates any confusion of the
2
7049
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small database I wrote for home, the combo boxes and listboxes no longer display the bound column. For example, on a form I have a combo box based on a table called 'names'. The two columns in the combo box are ID and Surname. The combo box and list box...
3
3988
kcdoell
by: kcdoell | last post by:
I have 5 cascading combo boxes on a form. Below is a sample of my vb in the first combo box: Private Sub CboDivision_AfterUpdate() 'When the Division is selected, the appropriate Segment list will 'display in the drop down list of CboSegment With Me! If IsNull(Me!cboDivision) Then
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.