A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

boundcolumn



 
 
Thread Tools Display Modes
  #1  
Old April 25th, 2008, 09:07 PM posted to microsoft.public.access.forms
jrizzo77
external usenet poster
 
Posts: 10
Default boundcolumn

can't figure it out. I have a combo box setup as below.

bound column = 2
column count = 2

I want to return the data in the second column to the table.
example:

1 Apple
2 Orange
3 Grape

I need to use the numbers in the 1st column so the user knows the
order of the second column but I want the value of the 2nd column
returned. I always get the value of the 1st column returned.

any help would be appreciated.
Ads
  #2  
Old April 25th, 2008, 10:13 PM posted to microsoft.public.access.forms
Steve Schapel
external usenet poster
 
Posts: 1,422
Default boundcolumn

Jrizzo,

By "returned", do you mean the value that is stored in the table field
that this combobox is bound to, or do you mean the value that is
displayed in the combobox after the selection is made?

If the latter, then you need to make the appropriate entry in the Column
Widths property of the combobox, which means hiding the first column,
like this...
Column Widths: 0;2.5

Alternatively, if you want to actually see the number column in the
combobox's drop-down list, you could reverse the order of the columns in
the combobox's Row Source query/table.

Alternatively, if the number column is only for sorting and nothing
else, you could change your Bound Column and Column Count property
settings to 1, and make the Row Source just the one column, the SQL
would be like this:
SELECT Fruit FROM YourTable ORDER BY SortNumber

--
Steve Schapel, Microsoft Access MVP

jrizzo77 wrote:
can't figure it out. I have a combo box setup as below.

bound column = 2
column count = 2

I want to return the data in the second column to the table.
example:

1 Apple
2 Orange
3 Grape

I need to use the numbers in the 1st column so the user knows the
order of the second column but I want the value of the 2nd column
returned. I always get the value of the 1st column returned.

any help would be appreciated.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.