Query from a 2 column field

  • Thread starter Thread starter Desmond
  • Start date Start date
D

Desmond

I have a field in a report that was originally designed
to let the user choose from a value list, where the
column that the user chooses is not the bound column

EX:
Row Source: "1";"AB";"2";"AK";"3";"AL"
column count: 2
Column width: 0",1"

The difficulty I have now is that I would like a report
to show me the results in the form of the unbound
column's text, not the bound column's numbers. When I
use report wizard, it only gives me the option to use the
bound column. I am stuck, please help me with this.
 
I have a field in a report that was originally designed
to let the user choose from a value list, where the
column that the user chooses is not the bound column

EX:
Row Source: "1";"AB";"2";"AK";"3";"AL"
column count: 2
Column width: 0",1"

The difficulty I have now is that I would like a report
to show me the results in the form of the unbound
column's text, not the bound column's numbers. When I
use report wizard, it only gives me the option to use the
bound column. I am stuck, please help me with this.

Create a two-field Table with the translation - e.g.

1 AB
2 AK
3 AL
<etc>

You can then join this Table to the query upon which the report is
based to look up the (state/province!?) abbreviation (I'd have just
used the 2-byte text rather than a 4-byte number but that's just me!)

You can then also change the RowSourceType of the combo to Table/Query
and the row source to this table.
 
If I want to change the nature of a field (say from
number to text, how do I do so without destroying the
data already stored in the table (in other words, convert
the data without losing it)?
 
Dear Desmond:

Add a new column to contain the text values. Put the text values in
that column and test the results. Drop the original number column.
Add it back as a text column and update it with the text values. Test
again to make sure it worked. Now trop the text column you added
first.

This is a low-risk way of doing it. But make a backup of the database
before you start anyway, just to make sure.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Is there a way to simply change the data to the 2 byte
rather than 4 byte text

I'm not quite certain what you're asking. The numeric field isn't
4-byte *text* - it's a 4-byte Long Integer. Where do you want to
change it?
 
Back
Top