473,583 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filling Combo box with values from a query & value list

Hi,

Just wondering if you can mix values in a combo box.

I want to fill it up with some query such as:
select name from tblDetails;

and that may produce a combo box with:
"John"
"Peter"
"Frank"

but I also want in that list... a string literal in it, without adding
a record row to the tblDetails.
"John"
"Peter"
"Frank"
"Blha Blah Blah"

Thanks

Jun 20 '06 #1
1 1555
On 19 Jun 2006 18:54:22 -0700, ja********@gmai l.com wrote:
Hi,

Just wondering if you can mix values in a combo box.

I want to fill it up with some query such as:
select name from tblDetails;

and that may produce a combo box with:
"John"
"Peter"
"Frank"

but I also want in that list... a string literal in it, without adding
a record row to the tblDetails.
"John"
"Peter"
"Frank"
"Blha Blah Blah"

Thanks


Something like:
Select tblDetails.Name Field from tblDetails Union Select 'Blah Blah
Blah' from tblDetails Order by tblDetails.Name Field;
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jun 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
10050
by: Todd D. Levy | last post by:
I have a table of Country names & Country codes in alphabetical order. This is a lookup table that a number of other tables use to populate the Country field via a drop down Combo Box on the form(s) for the table(s) in question. The "United States" Country name & the "US" Country code are selected 99% of the time. I would like to have...
5
2373
by: Dalan | last post by:
I have been searching the archives in an effort to discover how to derive a dual use of a single combo box - so far no go. I found the piece below which pretty much represents the usage. To summarize: The cboKeyword box on the frmCustomer looks up Keywords from a separate table that have just a list of keywords and a KeyID number. The bound...
1
1898
by: JRT | last post by:
I have a continuous form with 3 comboxes, combo1, combo2 combo3. The choices in combo2 are dtermined the what is selected in combo1 by using a where = combo1 statement. The combo is refreshed with code, i.e. . The combo are freshed with code on after update of previous combo. SO combo1 after update might be me.combo2.requery. It works...
3
3199
by: mal | last post by:
Sorry for repost - system added to another subject for some reason Have tried numerous ideas from the group to solve this one. It is such a simple example that it should be straightforward ! I just want to add a new item to a combo that has data from a file, by typing in the new value , adding to the file and the requerying to get the new...
2
946
by: fstenoughsnoopy | last post by:
I have a customer order database and I need to pull a customers information, ie first name, last name, address, city, state, zip, phone, etc, into the oder table. i don't know how to go about making this work...
8
8243
by: salad | last post by:
I was wondering how you handle active/inactive elements in a combo box. Let's say you have a combo box to select an employee. Joe Blow has been selected for many record however Joe has left the company and has been flagged inactive. If you have a filter on the rowsource like Where Active = True then Joe's name would not show up in the combo...
2
1651
by: lottaviano | last post by:
I have a form with two combo boxes. The value chosen in the first combo box (cbo1) is supposed to change the values that appear in the second combo box (cbo2). This currently works great for the first record entered by the user (continuous forms). However in the second record, cbo2 shows the values influenced by cbo1 in the first record,...
4
64564
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:...
0
7811
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...
1
7922
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...
0
8185
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...
0
6571
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...
1
5689
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...
0
5366
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...
0
3836
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2317
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
1
1416
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.