Compare fields from two different tables

C

c02homer

I am running Access 2003 (XP2-Pro). I have two tables:

Table 1 - Quiz takers make choices
Table 2 - contains correct choices

EXAMPLE:

TABLE 1

Name Choice
ID no. Key Field
Mary Sue Spaghetti
Tommy Joe Hotdogs
Billy DeWayne Hamburgers
Bobby Joe Spaghetti

TABLE 2
Id No Key Field
Correct Choice Spaghetti

I want to compare each Choice field entry in Table 1 with the Correct
Choice Field in Table 2, my thought being if the two items match,
return a 1, otherwise return a zero. (I would have an unbound
calculated field for each person (Mary Sue, Tommy Joe, Billy DeWayne
and Bobby Joe.)

I created a Parent Report and a subreport from the Correct Choices
table. I dragged the subreport on the Parent report. I created an
unbound field which does everything but work. This is what I put in
it:

If([Table1]![Choice]=[Table2]![Correct Choice],"1","0")

If anyone can give me any insight as to how to make this work - or tell
me if it's a pipe dream, I surely would appreciate it!!
 
C

c02homer

Sorry - left out some info:

"I created a Parent Report and a subreport from the Correct Choices
table. I dragged the subreport on the Parent report. I created an
unbound field which does everything but work. This is what I put in
it:"

Should say: I created Parent Report using Table 1 and a subreport
using Table 2.

Hope this helps clarify...
 

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