DLookup different values

  • Thread starter Thread starter ArneGolf
  • Start date Start date
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.
 
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."
 
Back
Top