View Full Version : proper name on report


joe789
05-03-2001, 01:27 PM
Greetings,

I have created a form which simply lists total counts for 10 different codes. As an example:

Code A 10
Code B 0
Code C 5
and so on ... ...

Each code has a proper name, for example; code A would be Dual-Funded Medicaid.

I am trying to list the proper name after the code, for example:

Code A Dual-Funded Medicaid 10
and so on.

I have attempted to create a textbox with an IIf statement in it, to display the appropriate name when the code is given, but it does not work?

Is there anything I can do? I am pulling data in from the Account table to get the total counts. I do have a CodeTable which lists the codes and their appropriate names. They are linked together using a primary key. I have tried creating a textbox to list the name using this method; but it does not work either.

Am I doing something wrong, or isnt this possible?

My IIf statements look like this:

=IIf([Code]='A','Dual-Funded Medicaid',IIf([Code]='B','Dual-Funded Non-Medicaid',IIf([Code]='C','Non-Funded,'none')))

and my associations look like this:

=[Accounts]![Code]=[Codes]![ProperName]

Neither of these two methods work. I would appreciate any help. Thank you very much.

Joe

KevinM
05-03-2001, 02:01 PM
Create a query with all the relevant tables and fields required.
Base your form on this query.
There is no need for a lengthy iif expression if you already have this information in a linked table.

HTH