473,666 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Putting three list boxes once selected into one column

4 New Member
Hi,
Just joined, am looking for some expert advice and hoping I can get it from here.
I have a MS Access 2003 database with several tables, queries, forms etc.
My question is I have a simple form which has 5 boxes on it listing information from tables and queries. One of the boxes is linked to a lookup where I can get it to dispaly three values but once the user selects which one they want it only displays the first value. I want it to display all three under the one column so to speak. The Lookup lists Order, Forenames and Surname but only lists the Order when selected. Is there any way I can get all three values under the one column rather than having to put three boxes with three lookup's and then the user having to do it three times to get the information?
Grateful for any advice
thanks
Dec 2 '11 #1
5 1451
sierra7
446 Recognized Expert Contributor
Hi Phil,
You need to create a query which includes the three fields and use this as the basis of your RowSource for the combo. You can either build the query in the combo or save a query and give it a name then enter the name as the Rowsource.

To display three columns you must set the ColumnCount to 3, set the widths, try "2;2;2cms" to start with, then set the total Width from Auto to 6cms.

There are issues with Bound Column and whether you need hidden columns (where width =0) but this should get you started.

Have fun!
S7
Dec 2 '11 #2
Phil Maskell
4 New Member
Have created a query which gives the 158 records in three columns titled Order, Forename and Surname, that works great and lists all the details. My problem is when I use that query in the form, I want those three fields from a drop down to automatically be inserted once selected. e.g. Order, Forename, Surname, user selects and then all three bits of information from the three columns is filled in. At the moment my form has 5 fields on it Order (which has the three drop downs) Date Attended and Date Next due, once the user selects the drop down it is only putting the Order number in and not all the information. Any clearer?
Dec 2 '11 #3
NeoPa
32,568 Recognized Expert Moderator MVP
Ah, I was afraid this might be what you were after when I answered your other thread. This question is sufficiently different to be allowed as a separate question, but nevertheless I believe keeping it all together may have made things a little clearer and easier to deal with. No matter.

Only one column can be bound to the control. As such, unless you create a query where all three values are joined together into a single string value, it is not possible to return all values in a single control. It is possible, using .Columns() and some VBA code, to populate other controls on your form whenever an update (selection) is made to the ComboBox.

However, and this is a very big however, it seems that what you are attempting to do is contrary to Normalised Database theory, and as such is strongly advised against. Check out this very important and seminal subject for databases (Database Normalisation and Table structures). I cannot express how important such an understanding is to doing anything worthwhile with databases.

In a normalised database you would expect to store only a link to the record of the other table in the one being maintained. It is almost never a good idea to copy such data across en masse.
Dec 3 '11 #4
Phil Maskell
4 New Member
Thanks for your response, having finally 'cracked' it, you can do it in a query, I have created an expression drawing the fields from the table, i.e.
Expand|Select|Wrap|Line Numbers
  1. Expr1: [Person Details]!Order & [Person Details]!Forenames & [Person Details]!Surname
Thanks for the responses
Dec 5 '11 #5
NeoPa
32,568 Recognized Expert Moderator MVP
Spaces in there would make it more recognisable, but we don't know your exact requirement so what you have may be adequate. The important things is that you have what you need :-)
Dec 5 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2580
by: Lamine Darbouche | last post by:
Can anybody help? I need to have three list boxes automatically populating each other, (ie when region is selected from the first listbox, it will populate automatically the second one which is the TOWNS and when the town is selected is should populate the third one AREA) all data is in the database in one table. Any idea??? Many thanks in adavance. Lamine
2
2018
by: Ellen Manning | last post by:
I'm developing an A2K adp that contains doctor info and the months they are not available for teaching. A doctor can be unavailable for some months for one year and other months for another year. I want the user to enter the year then use a multi-select list box to choose the months not available, then go to a fresh screen, enter another year and choose the months not available for that year, and so on. In the table, there is one record...
8
2566
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and courses are populated. When course is selected, lists of occurrences, groups and
1
2237
by: Stephene | last post by:
New to the world of web design/php/mysql and need help please. What I'm trying to do: I would like a web page with three drop down menus each populated by a query The first represents locations ie Room1, Room2 etc The second represents locations within the rooms i.e Rack1, Rack2 etc
7
4510
by: ljungers | last post by:
Have Form-1 with 3 text boxes and 1 command button. With any of the 3 boxes filled out and button is clicked, a Macro is performed that Opens a Query that has a WHERE clause that uses the 3 test boxes of data from form-1. 1) How do I cause the SQL command window not to show for that SQL command? The query results is placed in a ListBox on Form-2 and desired rows in the list box are selected/clicked, followed by a click on a button that...
4
64589
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one determines the available options in the other. TERMINOLOGY Row Source: The table/query from which the Combo Box or List Box gets its values. Note: There are other types of row sources that can be used but for simplicity we will stick with Tables...
7
1706
by: Clamato | last post by:
Hello everyone, I've been working on this for a bit and wonder if anyone can shed some light on my situation. My ultimate goal is to have a user select an item in a list box, have one column in the list box display in either a text box or preferrably a button based on what is selected. The form is being used currently as a rudimentary document retrieval system. The document that is saved on a shared drive is linked in a table by a...
12
4029
by: micarl | last post by:
How would i print a report based on criteria selected from several Combo Boxes as well as multiple Multi Select List Boxes, that are located on the same form? I can get one Multi List Box, just not several, to report using this code i found - Private Sub cmdPreview_Click()
2
3033
by: hollinshead | last post by:
hi there, i have been having this issue for quite some time now and i cant seem to get my head around it. I am trying to create a database for candidates CV's and covering letters. basically the data that is stored is made up of qualifications and areas of business that candidate is involved etc. My problem is with the query by form where i have a range of combo boxes and list boxes. The combo boxes are working fine, no problem however the...
0
8440
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
8352
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
8780
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
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
8636
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...
0
7378
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.