How to report combined lookup fields as text?

E

Eric

Hi

I'd appreciate any help you could give me with this
problem:

I have a query that reports information that selects:

a) Two fields A and B from other tables that use lookup
tables for their row source (actually both fields use the
same lookup table, which connects person names to
numbers).

Within their original tables each of these columns is
bound to the 2nd column of the lookup table - which is the
number column, and their data type is number). However,
what we see in any tables or queries that include these
fields is the 1st column, which is the text column of the
lookup table.

This is also the case in the current query.

b) A third field C - created within the query, which takes
information from one or the other of these fields
depending on whether the field [A] is null.

This selecting process is carried out by an IIF statement:

C: IIf([A] Is Null,,[A])

The problem is, that the result of this IIF statement is
to display a list of lookup NUMBERS in Column C, not
lookup text as I wanted.

Here is some representative sample data from the query
below:

A B C (should be) C(what it is now)
Marc Peter Marc 11
John Sara John 21
Arnie Arnie 13
Joan Melissa Joan 15

How can I get it to come out as text?

Thanks in advance,

Eric
 
T

Ted Allen

Hi Eric,

You can use the .column property of the combo box to
refer to the value of any column in the combo box. The
column numbering starts at 0. Try using the format

ComboBoxControlName.Column(0)

to pass the value (substituting the control name of
course)

-Ted Allen
 
G

Guest

Thanks Ted!

Eric

-----Original Message-----
Hi Eric,

You can use the .column property of the combo box to
refer to the value of any column in the combo box. The
column numbering starts at 0. Try using the format

ComboBoxControlName.Column(0)

to pass the value (substituting the control name of
course)

-Ted Allen
-----Original Message-----

Hi

I'd appreciate any help you could give me with this
problem:

I have a query that reports information that selects:

a) Two fields A and B from other tables that use lookup
tables for their row source (actually both fields use the
same lookup table, which connects person names to
numbers).

Within their original tables each of these columns is
bound to the 2nd column of the lookup table - which is the
number column, and their data type is number). However,
what we see in any tables or queries that include these
fields is the 1st column, which is the text column of the
lookup table.

This is also the case in the current query.

b) A third field C - created within the query, which takes
information from one or the other of these fields
depending on whether the field [A] is null.

This selecting process is carried out by an IIF statement:

C: IIf([A] Is Null,,[A])

The problem is, that the result of this IIF statement is
to display a list of lookup NUMBERS in Column C, not
lookup text as I wanted.

Here is some representative sample data from the query
below:

A B C (should be) C(what it is now)
Marc Peter Marc 11
John Sara John 21
Arnie Arnie 13
Joan Melissa Joan 15

How can I get it to come out as text?

Thanks in advance,

Eric


.

.
 
E

eric

Thanks Ted,
Eric
-----Original Message-----
Hi Eric,

You can use the .column property of the combo box to
refer to the value of any column in the combo box. The
column numbering starts at 0. Try using the format

ComboBoxControlName.Column(0)

to pass the value (substituting the control name of
course)

-Ted Allen
-----Original Message-----

Hi

I'd appreciate any help you could give me with this
problem:

I have a query that reports information that selects:

a) Two fields A and B from other tables that use lookup
tables for their row source (actually both fields use the
same lookup table, which connects person names to
numbers).

Within their original tables each of these columns is
bound to the 2nd column of the lookup table - which is the
number column, and their data type is number). However,
what we see in any tables or queries that include these
fields is the 1st column, which is the text column of the
lookup table.

This is also the case in the current query.

b) A third field C - created within the query, which takes
information from one or the other of these fields
depending on whether the field [A] is null.

This selecting process is carried out by an IIF statement:

C: IIf([A] Is Null,,[A])

The problem is, that the result of this IIF statement is
to display a list of lookup NUMBERS in Column C, not
lookup text as I wanted.

Here is some representative sample data from the query
below:

A B C (should be) C(what it is now)
Marc Peter Marc 11
John Sara John 21
Arnie Arnie 13
Joan Melissa Joan 15

How can I get it to come out as text?

Thanks in advance,

Eric


.

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top