DLookup different values

A

ArneGolf

I am trying to get a report to pull a value that has options values of 1 and
2 plus handle null. Option Value 1 should =CourseUseFee, Option Value 2
should = CourseUseFee/2
This part works: =IIf([TrailFee]=1,DLookUp("CourseUseFee","Fees"),"") .
Now I want to add something like
=IIf([TrailFee]=2,DLookUp("CourseUseFee","Fees"),"") only divided by 2.
I don't care if I use DLookup or something else.
 
A

Al Campagna

ArneGolf,
Try... (all on one line)
IIf([TrailFee]=1,DLookUp("[CourseUseFee]","Fees"),IIf([TrailFee]=2,DLookUp("[CourseUseFee]","Fees")/2,""))
Or in this particular case... a shortcut...
=DLookUp("CourseUseFee","Fees")/[TrailFees]

Check my syntax, but that should do it.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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