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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Display column 4 in combo box AfterUpdate



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2004, 05:39 PM
Bradley C. Hammerstrom
external usenet poster
 
Posts: n/a
Default Display column 4 in combo box AfterUpdate

A2K

Say a combo RowSource query has 5 columns, with the last four visible in the
drop down list (column width of 0" for column 1). The bound column is column
1. After a selection is made, I want the displayed column to be the fourth
one, instead of the second one (the first column with a non-zero width).

How do you display a column other than the bound column in a combo box after
a selection is made?

Brad H.


  #2  
Old May 27th, 2004, 06:26 PM
Tasha
external usenet poster
 
Posts: n/a
Default Display column 4 in combo box AfterUpdate

In the after update event you should be able to requery the rowsource to rearrange the column order or reset the column widths properties but why would you want too? What happens when the user makes a selection, the change in the column order is made, and then the user decides that's not the option he wanted?

----- Bradley C. Hammerstrom wrote: -----

A2K

Say a combo RowSource query has 5 columns, with the last four visible in the
drop down list (column width of 0" for column 1). The bound column is column
1. After a selection is made, I want the displayed column to be the fourth
one, instead of the second one (the first column with a non-zero width).

How do you display a column other than the bound column in a combo box after
a selection is made?

Brad H.



  #3  
Old May 27th, 2004, 06:29 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default Display column 4 in combo box AfterUpdate

The text displayed in the combobox is from the first visible column, as you
stated. So, to make the fourth visible column display instead, you would
need to change the order of the fields in your query (left to right) to make
the fourth visible column the first one. Another option is to place a
textbox next to the combobox and set the control source of the textbox to

=cboMyCombo.Column(4)

The Column property's number is zero based, so 4 is the 5th column. Set the
Locked property of the textbox to yes and, if desired, the enabled property
of the textbox to no.

--
Wayne Morgan
Microsoft Access MVP


"Bradley C. Hammerstrom" wrote in message
...
A2K

Say a combo RowSource query has 5 columns, with the last four visible in

the
drop down list (column width of 0" for column 1). The bound column is

column
1. After a selection is made, I want the displayed column to be the fourth
one, instead of the second one (the first column with a non-zero width).

How do you display a column other than the bound column in a combo box

after
a selection is made?

Brad H.




 




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 08:26 PM.


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