473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Combo box help

111 100+
i have a combo box whos row source is being populated by a choice made in another combox box using the following code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Balcony_Category_AfterUpdate()
  2. If [Category].Value = "Inside" Then
  3.     Me.CategoryNum.RowSource = "SELECT tblCabins.InsideCat, tblCabins.InsideCatB FROM tblCabins WHERE tblCabins.GroupNumber = '" & Me.GroupNumber & "'"
  4. ElseIf [Category].Value = "OV" Then
  5.     Me.CategoryNum.RowSource = "SELECT tblCabins.OVCat, tblCabins.OVCatB FROM tblCabins WHERE tblCabins.GroupNumber = '" & Me.GroupNumber & "'"
  6. ElseIf [Category].Value = "Balcony" Then
  7.     Me.CategoryNum.RowSource = "SELECT tblCabins.BalCat, tblCabins.BalCatB FROM tblCabins WHERE tblCabins.GroupNumber = '" & Me.GroupNumber & "'"
  8. ElseIf [Category].Value = "Suite" Then
  9.     Me.CategoryNum.RowSource = "SELECT tblCabins.SuiteCat, tblCabins.SuiteCatB FROM tblCabins WHERE tblCabins.GroupNumber = '" & Me.GroupNumber & "'"
  10. End If
  11. End Sub
This works, but i want the output to be in a single column form, instead of two. Is this possible?
Oct 30 '07 #1
5 963
Rabbit
12,516 Expert Mod 8TB
What do you mean? Concatenate the two columns?
Oct 30 '07 #2
Neekos
111 100+
yes. right now it looks like this:

A B C

and you cant select just A or just B or just C.

i want it to be like so:

A
B
C

so that you can select them individually.
Oct 30 '07 #3
Rabbit
12,516 Expert Mod 8TB
You're looking for a union query.
Oct 31 '07 #4
Neekos
111 100+
Yes! thank you my friend!
Oct 31 '07 #5
Rabbit
12,516 Expert Mod 8TB
Not a problem, good luck.
Oct 31 '07 #6

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

Similar topics

2
by: SoftWhiteDelgiht | last post by:
Help me. I am obviously stupid! :-) I am just starting out with VB.Net and am trying to do a simple master/detail form with a SqlServer backend. I have created a combo box which is to populate with...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
5
by: jjyconsulting | last post by:
Newbie needing some help. I have a tblParticipants. The fields include gender, education_level, income, occupation etc., I'm trying to create a form where a user can run a query from the form and...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
3
by: sparks | last post by:
I have a combo box that when you go to the next combo box it is filtered based on the value in the previous one. so if combo box 1 has fred as its value then combo box 2 has 1 2 3 for values....
2
by: jafarsibtain | last post by:
hi.. I am creating a form where there are two combo Boxes (drop Down) > Program_Combo_box > Course_Code_Combo in the Program Combo Box there are five items in the list > 1. BIT 2.BCA 3....
2
by: Sid | last post by:
I need some help in setting up Access combo box. I am using three comboboxes in my form. Comb Box 1, Combo Box 2, Combo Box 3. The row source for each of the combo box is a seperate table. ...
4
by: Dave | last post by:
I wasn't sure how to search for previous posts about this, it felt real specific. Ok so here's the database & problem: I have 4 combo boxes: cboServer, cboPolicy, cboDB, and cboApplication. ...
6
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help with a combo box and this same code works on my first tab with a combo box. The error or problem i have is this code causes an index out of range error when i run it on my second combo...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.