473,490 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Set Up a ComboBox

16 New Member
All I'm trying to do is this:

I have an existing database of prospective clients, and want to make a combo box out of the Organization Name so that it fills in any name currently in the database if you type in the first few letters. I'd also like to do the same with the Notes Box.

Can anyone describe how this would work on a step-by-step, "this person is a complete idiot who can't figure out ANYTHING on their own and has to be told how to go to the bathroom step-by-step or they'll wind up covered in their own filth" kind of way???
Feb 19 '07 #1
14 2423
desperateloser
16 New Member
Alternately, can anyone give me an url for a site where this would be more appropriate to ask ("Access-for-the-Clueless.com")???
Feb 19 '07 #2
nico5038
3,080 Recognized Expert Specialist
No need for another site, here the knowledge is available and remember that all of us started clueless :-)

1) Add a new combobox
2) Use the wizard to select the OrganisationName as the only field.
3) Finish the wizard
4) Open the properties when the combo is selected (The hand with white sheet button)
5) Under the Data tab you'll find a SELECT OrganisationName from tblX;
change that into:
SELECT Distinct OrganisationName from tblX;
6) Close and save the form.

That's all, let me know when you get stuck and at which point.

Nic;o)
Feb 19 '07 #3
desperateloser
16 New Member
And, as predicted, that would be Step 2 - how do I use the wizard???
Feb 20 '07 #4
desperateloser
16 New Member
Okay, I got the wizard to work...but I don't see the words you mention anywhere...
Feb 20 '07 #5
desperateloser
16 New Member
Anywhere in the properites box, I mean...also, if I understandit right, I'm creating a >new< combo box taking values from the >old< field - is there any way to turn the >original field< into a combo box with the properties I mentioned?
Feb 20 '07 #6
nico5038
3,080 Recognized Expert Specialist
Anywhere in the properites box, I mean...also, if I understandit right, I'm creating a >new< combo box taking values from the >old< field - is there any way to turn the >original field< into a combo box with the properties I mentioned?
Yes, right-click the field and select from the popup "Change into" > "Combobox"
Next goto the Data tab and press the [...] button behind the Rowsource property when the cursor is in the field.
Then select the Organizations field from your table and after closing the query editor add the "DISTINCT" as indicated above.

Nic;o)
Feb 20 '07 #7
desperateloser
16 New Member
Next goto the Data tab and press the [...] button behind the Rowsource property when the cursor is in the field.
Nic;o)
Now when I do that, 2 boxes come up.

- A small box labeled "Show Table" with 3 tabs - "Tables", "Queriries", "Both", and options to "Add" or "Close"

- A long, wide box labeled "OrganizationName: Query Builder" split into 2 fields:

The upper one is blank.

The lower is some kind of grid with the labels "Field", Table", Show", "Sort", Criteria", and "or".

Both have X and Y scroll bars, which don't seem to do much.

I don't see anything that looks like my form, or any of the field names for it.
Feb 20 '07 #8
desperateloser
16 New Member
AHA!

I pretty sure I just figured out how that works...
Feb 20 '07 #9
desperateloser
16 New Member
Hey! Am I understanding from the "Do you want to save and update" box that that is an SQL script???

I just made my very own

(painfully simple, ludicrously obviously brief, pathetically wizard-and-copious-online-help-guided)

SQL script???
Feb 20 '07 #10
nico5038
3,080 Recognized Expert Specialist
The wizard first asks for the table and there you place the table holding the OrganizationName.
The "Grid like form" is the graphical query editor.
Only doubleclick the OrganizationName to get it placed as a field.
Then close the form and continue with the Recordsource instruction, indicating you need to change SELECT into SELECT DISTINCT in the Recordsource.
It's no SQL script, but an SQL statement :-)

Nic;o)
Feb 20 '07 #11
desperateloser
16 New Member
Still can't seem to puzzle out where the "Select Distinct" part should happen - when I'm done setting up the Statement I don't see "Recordsource" anywhere, just references to "Row source"....
Feb 21 '07 #12
nico5038
3,080 Recognized Expert Specialist
Always mixing the property names, use the Row source when it shows a:
SELECT OrganizationName FROMYourTable;

make that:
SELECT Distinct OrganizationName FROMYourTable;

Nic;o)
Feb 21 '07 #13
desperateloser
16 New Member
Hurm. Still can't seem to find what you're talking about. My "Row Source" field >just< Says "Organization Name", and if I try to put anything else in there, it crashes the statement - I just get a statement saying something's wrong with that name.

It works right now >almost< the way I want, pulling up a name from the records I've done so far based on what I type in. It does not actually fill out the rest of the form with data from the original record, which I presume is what you're trying to teach me how to tell it do.
Feb 23 '07 #14
nico5038
3,080 Recognized Expert Specialist
The first property under the Data tab is the Control source and will hold the "Organisation Name" as field where the data will be placed.
The Type of Rowsource property will hold the value "Table/query" and there is in the Rowsource field a SELECT .... statement.

This will only set the value of an Organisation to a value already entered in the table. It won't position the current record to another row. A new copy with the same data can't be created with a combo, without additional VBA coding.

Nic;o)
Feb 25 '07 #15

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

Similar topics

13
2740
by: Mr. B | last post by:
Here's the situation... You've a combobox with Items already added. Say they look like this (or even lines of text): 10-00-232 10-00-256 10-01-006 10-01-213 10-02-200
7
8477
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
8
12062
by: Zlatko Matię | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
2477
by: anonymous | last post by:
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new...
3
6803
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
2
6165
by: Don | last post by:
I've looked high and low for some code that will allow me to have a combobox with a flat borderstyle. I found a few examples, but nothing that was really usable for me. I had the following...
4
4600
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
6
2839
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
1
3353
by: polocar | last post by:
Ciao a tutti, leggendo qua e lą per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non č possibile impostare la sua...
5
5880
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique...
0
6974
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
7146
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,...
0
7183
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...
1
6852
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
7356
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...
0
5448
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,...
0
3084
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...
0
1389
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 ...
0
277
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...

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.