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  

Differentiating between displayed field value and stored field val



 
 
Thread Tools Display Modes
  #1  
Old January 26th, 2010, 10:21 AM posted to microsoft.public.access.forms
PVANS
external usenet poster
 
Posts: 7
Default Differentiating between displayed field value and stored field val

Good morning,

Please can someone help me with this:
I currently have a combo box on my form that displays three columns of data.
Upon selection of a choice in the combo box:
The bound_column is column 3
The displayed column is column 1

I need to keep the bound column as column 3 as it is linked to a query that
defines the value of a textbox later in the form. However, is there a way I
can make a textbox equal the displayed value in the combobox, ie: column 1?

What I am looking for is some VBA code to make a new textbox, called:
Product_Code = Combo16's displayed value

I am completely stuck but desperately need this, so any help would be
completely appreciated

Thank you

Paul
  #2  
Old January 26th, 2010, 10:58 AM posted to microsoft.public.access.forms
PVANS
external usenet poster
 
Posts: 7
Default Differentiating between displayed field value and stored field val

Hi again

Thanks to anyone who was looking into this for me - I found a method, in
case it might be of assistance -

Text68.Value = Me.Combo16.Column(0)

where Column(0) is the column of the combobox that is required

HTH


"PVANS" wrote:

Good morning,

Please can someone help me with this:
I currently have a combo box on my form that displays three columns of data.
Upon selection of a choice in the combo box:
The bound_column is column 3
The displayed column is column 1

I need to keep the bound column as column 3 as it is linked to a query that
defines the value of a textbox later in the form. However, is there a way I
can make a textbox equal the displayed value in the combobox, ie: column 1?

What I am looking for is some VBA code to make a new textbox, called:
Product_Code = Combo16's displayed value

I am completely stuck but desperately need this, so any help would be
completely appreciated

Thank you

Paul

  #3  
Old January 26th, 2010, 10:59 AM posted to microsoft.public.access.forms
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default Differentiating between displayed field value and stored fieldval

hi Paul,

On 26.01.2010 10:21, PVANS wrote:
I need to keep the bound column as column 3 as it is linked to a query that
defines the value of a textbox later in the form. However, is there a way I
can make a textbox equal the displayed value in the combobox, ie: column 1?

What I am looking for is some VBA code to make a new textbox, called:
Product_Code = Combo16's displayed value

I am completely stuck but desperately need this, so any help would be
completely appreciated

Use the Column() function, e.g. bind =ComboBox16.Column(1) to a
TextBox's control source or use it in a VBA procedure.


mfG
-- stefan --
 




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 04:23 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.