displaying an "alias" value in a table

  • Thread starter Thread starter NES
  • Start date Start date
N

NES

I created a DB a year ago in which one of the tables holds input from a form.
Several of those table fields hold record numbers from other tables or
queries, HOWEVER the table field display substitutes the information in lieu
of the record number.

For instance I might select "Mary Ann" from a dropdown list. Mary Ann
happens to be record number 35 in that lookup table. However, the table this
information is then stored in hold the number 35. But it displays "Mary Ann"
in spreadsheet view.

I don't know where I learned to do that. Looking at either table gives me
no clue. How does one do this?

I need to do it again. Thanks very much.
 
Open the table in design view.
Select the problem field.
In the lower pane of the table design window, click on the Lookup tab.

You will see that it is set up as a Combo, where the bound column is
zero-width. Change it to Text box if you just want to see the number.
Alternatively, set the width of the first column to (say) 0.4" so that it
shows the number, but you still keep the combo.

Some of us believe that having combos in your table just confuses people
about what is really there. To read more about that opinion, see:
http://www.mvps.org/access/lookupfields.htm
 
Allen, thank you very much for responding. I certainly understand the
"confusion" part of the argument. I knew that the first time I used it. I did
make note of it in the table design view for each field (3) in which it was
used. It made the table more readable for those for whom I was creating the
application, and it seemed like a good idea.

I am experimenting with a new idea for my current project, and may have a
slightly different use for the "effect".

Thanks again for the assist.
--
Norm Shimmel
Butler, PA


Allen Browne said:
Open the table in design view.
Select the problem field.
In the lower pane of the table design window, click on the Lookup tab.

You will see that it is set up as a Combo, where the bound column is
zero-width. Change it to Text box if you just want to see the number.
Alternatively, set the width of the first column to (say) 0.4" so that it
shows the number, but you still keep the combo.

Some of us believe that having combos in your table just confuses people
about what is really there. To read more about that opinion, see:
http://www.mvps.org/access/lookupfields.htm
 
Allen, thank you very much for responding. I certainly understand the
"confusion" part of the argument. I knew that the first time I used it. I did
make note of it in the table design view for each field (3) in which it was
used. It made the table more readable for those for whom I was creating the
application, and it seemed like a good idea.

The lookup field is useful for only two things, in my opinion: it makes it
easier to use table datasheets for routine interaction with the data, and it
make it a tiny bit easier to add a combo box control to a form.

The first advantage is really a DISadvantage, since table datasheets are of
very limited utility and should not be even *seen* by endusers, much less
routinely used for data interaction. Forms are much more powerful and to be
preferred.

The downsides of lookups, as noted in the mvps website, much outweigh the one
minor advantage.

John W. Vinson [MVP]
 
Users should never interact directly with tables/queries. They should
always use forms. The forms can be displayed in datasheet view so they look
like tables if the users like that look but the only place you have control
over what goes on is with a form. Use combos in the form to show text data
and store the numeric data. If you, as the developer, want to see the text
then create queries that join to the lookup table so you have both the
numeric value and the text value available.


NES said:
Allen, thank you very much for responding. I certainly understand the
"confusion" part of the argument. I knew that the first time I used it. I
did
make note of it in the table design view for each field (3) in which it
was
used. It made the table more readable for those for whom I was creating
the
application, and it seemed like a good idea.

I am experimenting with a new idea for my current project, and may have a
slightly different use for the "effect".

Thanks again for the assist.
 
Back
Top