Form Field Referencing another table

mabiem

Registered User.
Local time
Today, 07:04
Joined
May 3, 2013
Messages
16
I have a linked table that i'm displaying individual questionnaire responses via a form. Most of the "responses" in this table make no sense, they are numerical. I can use "IIF" commands to display say the 1 as "no" and the 2 as "yes" or whatever the case is.

I have one field that is problematic. It is a field that displays a number from 1-72 based on a major a student would like to peruse. "IIF" won't work with that many fields.

I can easily create a table of the majors with their ID. If there a way in the form to say:

"Take whatever number is display here and reference the Major table and display the major for that number"

Thanks,

Mike
 
Sounds like you need to use the DLookup() function. The Access help files can explain the syntax. Post back if you still have problems.
 
Thanks!

This works like a charm:

=DLookUp("Major","Major List","Id=" & [Q37_2])

One question. If they have not requested a Major and this field is NULL, it displays #error. How do I add something to get it to ignore null?

Mike
 
This worked for the null error:

=DLookUp("Major","Major List","Id=" & Nz([Q37_1],0))

Thanks guys!
 

Users who are viewing this thread

Back
Top Bottom