473,766 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo box bound column value

Hi,

I have a form with a combo box containing 4 columns of data.

The form also contains 3 print buttons where the goal is to open 3 different
reports according to the value in one of the columns of the combo box.

Since the bound column property determines which value to look at, how do I
change the bound column's value in an onClick event?

Regards,

Cindi

Nov 13 '05 #1
3 16660
Cindi Simonson wrote:
Hi,

I have a form with a combo box containing 4 columns of data.

The form also contains 3 print buttons where the goal is to open 3
different reports according to the value in one of the columns of the
combo box.

Since the bound column property determines which value to look at,
how do I change the bound column's value in an onClick event?

Regards,

Cindi


You don't need to. You can access any of the columns with this syntax...

Me.ComboBoxName .Column(n)

....where n is the zero-based ordinal of the column you want.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

"Rick Brandt" <ri*********@ho tmail.com> wrote in message
news:36******** *****@individua l.net...
Cindi Simonson wrote:
Hi,

I have a form with a combo box containing 4 columns of data.

The form also contains 3 print buttons where the goal is to open 3
different reports according to the value in one of the columns of the
combo box.

Since the bound column property determines which value to look at,
how do I change the bound column's value in an onClick event?

Regards,

Cindi


You don't need to. You can access any of the columns with this syntax...

Me.ComboBoxName .Column(n)

...where n is the zero-based ordinal of the column you want.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Thank you. Where exactly do I put that line of code or what do I associate
it with?

Currently, I'm using a separate button and query with
[FORMS]![nameofform]![SELECT] in the criteria to open a report based on the
value selected from a combo box. The combo box contains column 1=DeptID,
column 2 =ProgramID, column 3=CourseID, column 4=CourseTitle.

The above criteria doesn't work unless the correct ID is in the matching
bound column.

Cindi
Nov 13 '05 #3
Cindi Simonson wrote:
Thank you. Where exactly do I put that line of code or what do I
associate it with?

Currently, I'm using a separate button and query with
[FORMS]![nameofform]![SELECT] in the criteria to open a report based
on the value selected from a combo box. The combo box contains
column 1=DeptID, column 2 =ProgramID, column 3=CourseID, column
4=CourseTitle.

The above criteria doesn't work unless the correct ID is in the
matching bound column.


You're correct. Then Column(n) syntax does not work from a query. There are
two ways to work around this.

1) I've never used it, but I have read that you can wrap the criteria
expression in the Eval() function and it will work. Instead of...

[FORMS]![nameofform]![SELECT].Column(1)

....try...

Eval([FORMS]![nameofform]![SELECT].Column1))

2) You can create hidden TextBoxes on the form with ControlSource
expressions like...

=[SELECT].Column(1)

=[SELECT].Column(2)

Etc.,

....and then refer to these hidden TextBoxes in your query instead of the
ComboBox.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #4

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

Similar topics

5
2383
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 column is tied to the autonumber and is saved in the frmCustomer table. The keywords appear in the...
2
7764
by: Ed via AccessMonster.com | last post by:
Hi all, What I am trying to do is get the value of the second column of a bound combo box in vba. example: Combo box: column 1-ID column 2-SIGN_CODE 1 R-1.gif 2 R-2.gif
8
18392
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". The values in the dropdown are loaded in the correct order, but the initial value is not the first row of the dropdown as I expected. The field "CategoryName" is not the primary key for the table -- the PK is
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...
9
6767
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 second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
4
64632
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...
2
1789
by: RamanS | last post by:
I have created a combo box with the following properties: RowSourceType: Value List RowSource: "0%";"10%";"25%";"36%";"37%" Bound to column: 1 Limit to List = Yes Default Value = None Format: Percent Decimal Places: 0 Column Count: 0
4
2473
by: Karl | last post by:
Using A2000 with 2 tables Table 1 is a reference table with 2 fields Table 2 has 2 fields and 2 combo boxes to lookup date in table 1 Combo1 binds to col 1 in table 1, this works OK Combo 2 is set to bind to col 2 in table 1 but it always binds col 1 Column Count is set to 2 and I can see both columns in the dropdown Bound Column is set to 2
0
9404
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
10008
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...
0
9837
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
8833
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...
1
7381
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
5279
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
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
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
3
2806
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.