Re: Fill Text Caption with Value
- From: Martin <Martin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Jun 2007 14:05:01 -0700
I figured it out. I am using a Label in my form and using the DLookUp
function is provding the results I wanted to obtain.
Thanks everyone for trying to help. For others facing this same challenge, I
hope this post provides any help.
Best.
"Martin" wrote:
.
I think I did not communicated what I need. I am trying to display, not
select, the default value of the field from the Main Form. In the example I
described, the combo field in the Main Form is bound to the first column, and
shows the second column. Therefore, if I set the default value in this combo
box, it will have to be any value in the ID column. Let's say that I set '2'
as the default value, which will display Bob when a new record is entered.
Now, what I would like to do, is in a different form, read the value stored
as default in the main form. In the case of the field I described above, I
want to show that the default value stored in the field's properties Default
Value is 'Bob' and not the '2'.
I hope this explains it further. Thanks for your help.
"lwperry" wrote:
if you are wanting to display the 2nd column's data on a new form, you can
add a text box and set it's control source to forms![MyForm].ComboBoxName.
Column(1)
Of course you will need to change the [MyForm] and [ComboBoxName] to the form
and control in your database. Column references start at 0 instead of 1, so
the first field in the combo box is column(0) and the 2nd is column(1).
Martin wrote:
I have a form that is reading the default values of the fields in the Main
Form. One of these values is a number refering the the Unique ID of the field
represented as a Combo Box. However, I would like to show the second column
of the table that this Combo Box references in its value. Does this makes
sense?
In other words, let's say I have a table with the following fields:
ID Name
1 John
2 Bob
The combo box in the Main Form refers to the above table, and is bound to
the first column, but displays the Name column. As a default value, the form
has "1". So when a new record is added, it will use "John" as the default
value.
What I would to do is in the new Form I am creating, is to display the
Default Value in this Combo Box of the Main Form but to its corresponding
value in the Second Column. That is, instead of showing "1", I want to show
"Bob".
Is this Possible?
Thanks.
- References:
- Re: Fill Text Caption with Value
- From: lwperry
- Re: Fill Text Caption with Value
- Prev by Date: Re: Access 2007 vs Access 2003
- Next by Date: Re: Function to return a Commision Percent based on input from for
- Previous by thread: Re: Fill Text Caption with Value
- Next by thread: Re: How to display a msgbox if on data change if field value wasn't nu
- Index(es):
Relevant Pages
|