Re: Fill Text Caption with Value

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.


.



Relevant Pages

  • Re: Auto populate field
    ... the first column ... it's the second column that will be displayed to the user (in your case, ... If you want to display more than one column when the combox is rolled down ... the second column of the combobox and set its width to a very small value ...
    (microsoft.public.access.adp.sqlserver)
  • Re: treeview node selection
    ... For example you might display ... FirstName in the first column, and LastName in the second column, and date ... "Quote Of The Day" where the quote can be text from 1 to 500 characters ... In this case I would put the Date as the first column, ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Combo Box Display Question
    ... Thanks Bob, your idea works great! ... and the width of the second column to the entire size of the combo ... >> combo box to see both columns and make a selection. ... Is it possible to display the name field ...
    (microsoft.public.access.forms)
  • Re: Matching Adjacent Columns?
    ... I'm having trouble writing a formula to insert specific values from a column ... the second column that is adjacent to the first column. ... should display "no match". ...
    (microsoft.public.excel.worksheet.functions)
  • Matching Adjacent Columns?
    ... I'm having trouble writing a formula to insert specific values from a column ... the second column that is adjacent to the first column. ... should display "no match". ...
    (microsoft.public.excel.worksheet.functions)