problem with mulit-column value list combo box

I am trying to read the values of 2 columns of the selected item in a
multi-column combo box.

cboField1 is the multi-column combo box

cboField1.rowsource=3Dr1c1;r1c2;r2c1;r2c2;r3c1;r3c2.....
cboField1 Row Source Type=3DValue List
cboField1 Column Count=3D2

  Me("cboField1").ItemData(2)
gives me the value for column #1 in row #2

  Me("cboField1").Column(1)
gives me the value for column #2 in row #1

I can't find the syntax for getting the value for column #2 in row #2.

Thanks for any help!
THANKS!
David G.
0
David
11/25/2009 2:38:31 AM
access 16762 articles. 3 followers. Follow

2 Replies
995 Views

Similar Articles

[PageSpeed] 25

On Tue, 24 Nov 2009 21:38:31 -0500, David G. <Dweeber62@GMX.com>
wrote:

Split(Me.cboField1.rowsource,";")(3)

Typically Access applications are only interested in the column values
of the selected row, which you can get via .Column(x).

-Tom.
Microsoft Access MVP


>I am trying to read the values of 2 columns of the selected item in a
>multi-column combo box.
>
>cboField1 is the multi-column combo box
>
>cboField1.rowsource=r1c1;r1c2;r2c1;r2c2;r3c1;r3c2.....
>cboField1 Row Source Type=Value List
>cboField1 Column Count=2
>
>  Me("cboField1").ItemData(2)
>gives me the value for column #1 in row #2
>
>  Me("cboField1").Column(1)
>gives me the value for column #2 in row #1
>
>I can't find the syntax for getting the value for column #2 in row #2.
>
>Thanks for any help!
>THANKS!
>David G.
0
Tom
11/25/2009 3:39:39 AM
 From Access 97 Help File

You can use the Column property to refer to a specific column, or column and 
row combination, in a multiple-column combo box or list box. Use 0 to refer to 
the first column, 1 to refer to the second column, and so on. Use 0 to refer 
to the first row, 1 to refer to the second row, and so on. For example, in a 
list box containing a column of customer IDs and a column of customer names, 
you could refer to the customer name in the second column and fifth row as:

Forms!Contacts!Customers.Column(1, 4)


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

David G. wrote:
> I am trying to read the values of 2 columns of the selected item in a
> multi-column combo box.
> 
> cboField1 is the multi-column combo box
> 
> cboField1.rowsource=r1c1;r1c2;r2c1;r2c2;r3c1;r3c2.....
> cboField1 Row Source Type=Value List
> cboField1 Column Count=2
> 
>   Me("cboField1").ItemData(2)
> gives me the value for column #1 in row #2
> 
>   Me("cboField1").Column(1)
> gives me the value for column #2 in row #1
> 
> I can't find the syntax for getting the value for column #2 in row #2.
> 
> Thanks for any help!
> THANKS!
> David G.
0
John
11/25/2009 2:05:46 PM
Reply:

Similar Artilces:

Here is fix for Windows file problems
If you have installed a Windows update and started having problems opening, closing, copying files, see: http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.excel.misc&mid=1fe358b1-c8eb-4217-ad2a-4b9fcf741916 A better solution is offered at http://support.microsoft.com/kb/918165 "Problems in Windows Explorer or the Windows shell after you install security update MS06-015". Patricia Shannon wrote: > If you have installed a Windows update and started having problems opening, > closing, copying files, see: > > http://ww...

Drop-down list #5
I created a drop-down list in a separate sheet in my workbook. I named it Vehicles. Now I want to add to the list, but I can't figure out how to do it. I know ig must be so easy, but I'm stumped. Please help. If it's a one-time occurrence, you can press Ctrl+F3, click on the name, and extend the formula. Otherwise, I would make the range dynamic. You can learn how to do that here: http://www.contextures.com/xlNames01.html#Dynamic HTH Jason Atlanta, GA >-----Original Message----- >I created a drop-down list in a separate sheet in my workbook. I named it >Vehicles...

if cell is text move left one column
ColB is a long list with sections names followed by category codes I need to move the text into colA leaving colB with codes only (all numbers) ColB. Doors 940590 555998 447006 447008 810697 810705 810706 810707 Windows 619435 525691 525692 Try Sub Macro1() Dim lngRow As Long For lngRow = 1 To Cells(Rows.Count, "B").End(xlUp).Row If Not IsNumeric(Range("B" & lngRow)) Then Range("A" & lngRow).Value = Range("B" & lngRow).Text Range("B" & lngRow).Value = "" End If Next End Sub -- Jacob ...

ignore list
I have importet some contact data into mscrm, When I want to add these contacts to a marketing list (add marketing list members / use advanced find/ add all selected members), the adding stops with an error. I have done a trace during the error (occurs everytime I want to add these contacts) which shows me the following error: [2009-08-24 11:15:36.778] Process:OUTLOOK |Thread:5884 |Category: Unmanaged.Platform |User: PlatformUser |Level: Error | Found crmId {319C876A-CC39-DC11-9F61-0030485C3892} in ignore list. Update notification will be ignored Function: CItemHelper<struct Outlook::_Co...

Problem with CFTPConnection
Hi I've an application that connects to an FTP Server and uploads a big directory (size over 500 MB). Now what happens is that after sometime the application stops uploading files and stays idle. The FTP server connection timeout value is set to 2 minutes. So the server seeing the connection idle for two seconds, disconnect the session and no more file is uploaded. On debugging I found out that after some time CFTPConnection.PutFile() method hangs on some random file and stays like that for 5 minutes (default send timeout value of CFTPSession). During this time the server connection timeo...

100% stacked column chart shows wrong information
I wonder if someone can help me. I have created a table that tracks the profitability of a particular project and I’m using the table as a source for a 100% Stacked Column graph. The source data for the graph is in three rows: • B21:M21 - contain the names of the months from Nov – Oct • B22:M22 - money taken in • B24:M24 - profit B23:M23 contains the money paid to supplier each month. I need this in the table but I don’t need to show it in the graph. I just want to show profit as a proportion of what we bill to customers on that project. My problem is that the graph seems to show in...

Excel 97 Win XP calc problem?
I have a machine running office 97 and Win XP. I have seen posts stating it runs fine, but I don't know how man people use spreadsheets that require a hard calculation: Excel will not force a calculation. i.e. ctrl-alt-f9 does not cause full workbook calculation as required. Meaning cells do not update and it doesn't calculate unless you clic in the cell to edit and hit enter. neither does the "Calc Now" button. Auto or manual calculation mode has no effect. Anybody else have this problem -- Message posted from http://www.ExcelForum.com Make sure that both the SR1 a...

Can SUMPRODUCT be used for entire column?
This formula results in a numeric result: =SUMPRODUCT((A1:A20)*(B1:B20="b")) but this formula results in a #NUM! result: =SUMPRODUCT((A:A)*(B:B="b")) Which means I need to specify the length of the columns, which may grow over time. Any way to do this for the entire column, without having to specify the length of the column? XL07 removed the limitation on array formulas (which SUMPRODUCT is, even though it doesn't require CTRL-SHIFT-ENTER) and entire columns. For pre-XL07, one can use =SUMPRODUCT(A1:A65535, --(B1:B65536="b")) to get all but on...

rounding up values
Has anyone done round up of values to the nearest dollar.For example I want to give a 10% of the price to my customers but if the result is other than .00 then I wanted to round up to the nearest dollar amount.My calculation using sql has been price * percent and then subtract the value from the price, then what do I need to do to roundit up??Thanks for your suggestion.Also I have a problem with my customers that I am extracting and the query does return all the values from 2004 and 2006 that are equal except for the price I have given them, how do I get only the latest ones in 2006 and not th...

CRM Outlook Client Configuration Wizard Problem
CRM 4.0 - Microsoft Outlook Client Guys, We've Microsoft CRM 4.0 Server roll up 8 as well as CRM Outlook Client on the same roll up version. Our Internal Web Access works without problems users get to it and they're automatically authenticated. IFD Development is the same way except they're prompt through a login page for their username and password when they're coming from an external network. Ever since we moved to a new facility users are experiencing problems connecting to CRM using their outlook client, I have a test machine where I have the CRM Outlook Client ins...

How to define the default value?
I would like to set the default value to be false, does anyone have any suggestions on how to do it in Excel? Thanks in advance for any suggestions Eric Public endChange As Boolean The default value for a Boolean is False when it is declared. No problem - it's already done for you. Want proof? Put this code right below it and run it repeatedly using F5: Sub TestEndChange() MsgBox "endChange is " & endChange endChange = Not endChange End Sub First time you run it, you'll see it is False. After that, it toggles between True and False. &quo...

Programming to search for a cell with certain value
I would like to be able to search for a cell with a certain string value? Then get that cells postions. Is there a way to programmatically to do that? Thanks Record a macro when you do it manually and you'll see the code. You can tweak it later. Use Edit|Find when you're recording. ms newsgrp wrote: > > I would like to be able to search for a cell with a certain string value? > Then get that cells postions. Is there a way to programmatically to do that? > Thanks -- Dave Peterson ec35720@msn.com The code you use in VB will be very similar to the code inherent to V...

TempVars unusable in field default value
Hello, I'm trying to use a temporary variable to keep track of which CSR is inputting data. I have a macro which prompts user for ID code, which is stored in the temp variable TempUser. On a form control default value property, I can use the expression [TempVars]![TempUser], which will populate that user's ID code into the control. However, I cannot use that same expression in the tables field default value property. If I try, when I save the changes to the table, I get the error message "Could not find the field 'TempVars]![TempUser'. " Any ideas why I ca...

average function and error/missing values
Average has what seems to be an odd (inconsistant) behavior to me. I want to be able to have a value of "" within the average function arguments, and for it to still return a result. For instance, if i have a cell with value 1 in it, and a cell with the following formula in it: "=IF(TRUE,"","")", and i then use Average function, with range that includes those two cells, result of Average is "1" [which is correct, and is what i want]. But, if i have the following use of Average function: =Average(1,IF(TRUE,"","")), Av...

How to view the TOTAL values in the 3D graphic- from a Pivotal tabel
Hello I have a pivotal table, and I have created a 3D graphic to show th results. However I would like to have the TOTAL (for each supplier) in th graphic as well, and I do not know how to do it. I am sending the file where is easy to understand ... Anyone can help? Thanks a lot in advance Kind Regards Mart Attachment filename: question about the total.xls Download attachment: http://www.excelforum.com/attachment.php?postid=69739 -- Message posted from http://www.ExcelForum.com I don't know of any way to include the grand total in a PivotChart. You can create a norma...

Problem with Update function of CRecordSet class
Hi All When I use from Update function of CRecordSet class, it apply to table after a few time(for example 1 second) when I need to see it at time. Thanks ...

How do I copy the result of a check box into another check box?
I'm trying to copy the result of a "check box form field" into another check box. For example: if I check (or uncheck) one box in a form, another box later in the protected form will also be checked (or unchecked) , much like the ref + F9 command for the text form field. Is this possible? Thanks. This cannot be done without macros. If your project will allow macros - see http://word.mvps.org/faqs/tblsfldsfms/ExclusiveFmFldChbxs.htm -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> G...

Global distribution List Not Appearing in Outlook Global Selections list
I have created a global list in AD in Server 2003 ( using Exchange 2003) and assigned my users. For some reason the list is not showing in the Outlook client global address list. I have compared this list to others i have created in the past and cannot spot any differences. What am I missing? 1. Have you got it hidden from the GAL? 2. Using cached Exchange mode? Therefore requiring a rebuild of the OAB to see it? Oliver On Fri, 16 Feb 2007 13:24:05 -0500, "rlm" <rmorton@execpc.com> wrote: >I have created a global list in AD in Server 2003 ( using Exchange 2003...

can I snap wrap points to a text box
rather than having to add individual wrap points to the edge of a frame, which is never as accurate anyway, can they be set to 'snap' to a frame (eg the ellipse) so that they are perfectly inline, (and which would of course be a lot quicker)? Edit points will not snap. There are options for edit points, select a point, right click. If you hold down control, the cursor will turn into an x, you can delete a point with a click. Truly a good draw program would be preferable. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com &q...

Sorting on Column headers
I have a spreedsheet that someone else created and I need to take the Column headers, which are in date form, and rearrange them in chronological order. Can this be done without cutting and pasting? I really need to save time with this project if possible. Thanks!:) --- Message posted from http://www.ExcelForum.com/ > I have a spreedsheet that someone else created and I need to take the > Column headers, which are in date form, and rearrange them in > chronological order. Can this be done without cutting and pasting? I > really need to save time with this project if possib...

request to solve my problem #5
hello friends this is vijay,i got a problem while doing my project based on vc++ (i.e)"How to implement Fit Window feature in VC++6.0 in an MDI Application" if any of you got any idea about that please do reply me with the proceedure.i will be waiting for your reply bye with regards vijayprasadreddy ...

OL2002 Problem : HELP, SOS, MAYDAY
Hi, I have an IMAP account and OL2002 as client. I have checked for my account ( tools, send/receive settings, define send/receive groups, <my_account>, edit) download item description only. It works only the first time I start OL2002, but it does not work anymore for subsequent automatic/manual send/receive operations. Please could someone really help me ? Thank you in advance, Patrick ...

Excel. I am having a problem with hidden text
As I type text in some cells, it does not always dispaly if it exceeds the cell length. I wish to keep the cell lenghts for the entire document, but do wish for teh text in that particular row to be displayed. How about if you select that cell, then format|cells|alignment tab|check wrap text And with that row selected format|row|autofit SHR77 wrote: > > As I type text in some cells, it does not always dispaly if it exceeds the > cell length. I wish to keep the cell lenghts for the entire document, but do > wish for teh text in that particular row to be displayed. -- Da...

Problem with macro assigned to custom toolbar button
Problem with macro assigned to custom toolbar button I am having a probelm with macros assigned to a custom button on custom button. I am using excel 2000. 1. I have created a macro called "Jump" in a workbook named "Test1" 2. I then created a custom toolbar and added a custom toolbar button t that toolbar. 3. Through the customize dialog box I assign the Macro "Jump" to th custom button. Everything works fine UNTIL. If I do a SAVE AS for the workbook "Test1" and call it something els like "Test2" and then close "Test2" an...

line chart with NA() values
12 month line chart, with some values being 0. I am using an if statement that turns any 0 values to #N/A so they do not show on the graph (which is what I want). My problem arises when the 0 values fall in the middle of my data. So for example: 1) data for all months (Jan-Dec), the line shows across all 12 months; 2) I have data for only 6 months (Jul-Dec), the line starts in Jul and ends in Dec (perfect); 3) When I have data from Jan-Mar, and Oct-Dec, the line connects between Mar and Oct. I want 2 distinct lines with no line where there is no data (#N/A). Any suggestions? -- gri...