473,387 Members | 1,420 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,387 software developers and data experts.

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 7025
On Thu, 23 Mar 2006 16:40:40 -0500, mshenoud
<ms******@mailbox.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.Columns(0) << this is the first column
Me.Combo1.Columns(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.Columns(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)=RejectionsTable![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)=RejectionsTable![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
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...
3
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...
1
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...
30
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...
0
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...
3
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...
1
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...
4
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...
1
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.