473,568 Members | 2,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ComboBox with two columns

I have a comboBox with two columns. I would like to isolate each column so
as
to compare it to an entry in a table so as to be able to load a yet another
form. how can I do that?

Details: The form is called MasterForm, it has a two columned comboBox
called
InsPVComboList. "Text.[column](0,0)" is my attempt to add to the where
condition in the macro to isolate each entry in the combobox. I have tried
Inselection.[column](0,0) but it did not work.
The code is as follows:
Forms![MasterForm]![InsPVComboList].Text.[Column](0,0)=[RejectionsTable]![Pa
rt
s_#]) And
([Forms]![MasterForm]![RejPVComboList].Text.[Column](0,1)=[RejectionsTable]
![
Vendor_Name])

Thanks

Mike
Mar 23 '06 #1
1 7053
On Thu, 23 Mar 2006 16:40:40 -0500, mshenoud
<ms******@mailb ox.syr.edu> wrote:
I have a comboBox with two columns. I would like to isolate each column soas
to compare it to an entry in a table so as to be able to load a yet anotherform. how can I do that?

Details: The form is called MasterForm, it has a two columned comboBoxcalled
InsPVComboList . "Text.[column](0,0)" is my attempt to add to the wherecondition in the macro to isolate each entry in the combobox. I have triedInselection.[column](0,0) but it did not work.
The code is as follows:
Forms![MasterForm]![InsPVComboList].Text.[Column](0,0)=[RejectionsTable]![Pa
rt
s_#]) And
([Forms]![MasterForm]![RejPVComboList].Text.[Column](0,1)=[RejectionsTable]![
Vendor_Name])

Thanks

Mike


Columns in Access combos are zero-based; the first column is 0, second
is 1 etc etc. You refer to Columns in a combo as such:

Me.Combo1.Colum ns(0) << this is the first column
Me.Combo1.Colum ns(1) << this is the second column

This refers to the currently selected value of the combo; you can also
refer to the "list" of the combo by doing this:

Me.Combo1.Colum ns(0,1)

The first number is the "column", second is the "row", so the example
above would refer to the First column, Second row (since rows are also
zero-based).

Your code would look something like this:

Forms![MasterForm]![InsPVComboList].Column(0,0)=Re jectionsTable![Parts_#]
And

[Forms]![MasterForm]![RejPVComboList].Column(0,1)=[RejectionsTable].[Vendor_Name]

This would be the First COLUMN Of row #1 and row #2 ... if you want to
get Column 1 and Column 2 of Row #1 you'd do this:

Forms![MasterForm]![InsPVComboList].Column(0,0)=Re jectionsTable![Parts_#]
And

[Forms]![MasterForm]![RejPVComboList].Column(1,0)=[RejectionsTable].[Vendor_Name]

watch for word wrapping on this one ...
Mar 24 '06 #2

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

Similar topics

3
1974
by: Paul Fairless | last post by:
Customers table - contains Columns: CustID, Surname, Forename, TtlID Titles table - contains Columns: TtlID, Title TtlID is a Foreign Key in the Customers table. I have a Form frmCustomers which contains a ComboBox to select the Customer's Title. The ComboBox is populated from the database
3
1711
by: JAdrianB | last post by:
I'm trying to use a datagrid for data entry. I've created a couple of combo box columns using information from http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q480q That example basically sets every combobox in a given column (for every row) to the same datasource. One obstacle I have to overcome is when a user changes a value in one...
1
2488
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 DataTable("table"); testTable.Columns.Add("Col1", typeof(Int32)); testTable.Columns.Add("Col2", typeof(String)); testTable.Rows.Add(testTable.NewRow());
30
4541
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a corresponding field in the lookup table. In my data table we store the ID in what I will call the 'key' field. == Description of the desired...
0
1807
by: zhuang | last post by:
Hi, Adding combobox to datagrid has been posted many times. I have a datagrid which has multiple combobox columns and normal textbox columns. But how could I change other combo box values at the same row when user change the value of one of the combo box. The textbox value in the same row could be changed by modifying the
3
917
by: Art | last post by:
Hi, Forgive me for posting this message in 2 groups -- it appears that the Data Access group isn't very active, so I'm posting again here: I have a DataTable that I want to fill using a DataGridView. I've set the DataSource of the DataGridView to my DataTable. My problem is that I want some of the columns to be drop downs. For example,...
1
1172
by: fiaolle | last post by:
Hi I have a DataGrid with ComboBox columns. I want the same thing to happen as when a user clicks and chooses an item in the ComboBox. When a user stands in the last row (new row) and clicks for choosing an item and it's in the list, a new row appears beneath. I want the same thing to happen when a user types in what he wants, as what you...
4
6031
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I am trying to populate a DataGridView Combobox column with a different data binding source (dataset) depending upon a selection made in a previous column. I can handle the previous column but how do I assign the following properties dynamically in code? DataPropertyName DataSource DisplayMember I do see how to set these at design time...
1
9010
by: alexmax2003 | last post by:
That quotation was add b4 i need to know from VB.Net wizards The answer "I'm trying to use a datagrid for data entry. I've created a couple of combo box columns using information from http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q480q That example basically sets every combobox in a given column (for every row) to the same datasource. One...
0
1271
by: piercy | last post by:
Hi, Im tyring to display a dataGridView with comboBoxes on about 5 of the fields. This table is basically permissions to certain parts of my program. In the database i just store a 1 or a 0 (access or no access). Now obviously to the user i want this to be displayed as text. Now currently i am creating the columns manually and using the cell...
0
7693
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...
0
8117
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...
1
7660
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
7962
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
6275
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...
0
5217
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
3651
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...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
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.