G
Guest
Hi there,
My issue is a little evil. I'm trying to create a report that is a balance
sheet of the company's machine sales. Each machine has an install and
warranty amount allotted to it. All manufacturers except one have hardwired
amounts tied to the machine model. Therefore, my code uses a DLookup to pull
up the correct amount if the manufacturer matches, and plinks it into a bound
textbox. This reports perfectly.
Now here's my problem. The red-headed stepchild manufacturer. Let's call
them Satan, Inc. Satan, Inc's install and warranty cost is a multiplier of
the customer purchase price. So right now I do the same thing as above, but
lookup the % multiplier, and list it in the textbox. So it uses the same
field as above, but just lists .15. I would like it to pull from the customer
purchase price, multiply it by "Install%", and plink it into the
abovementoined bound textbox. Then everyone would be happy.
My lookups look like this:
Me.txtinstallcost = DLOOKUP("[InstallCost]","[MachineModel]","[ModelID]=" &
cbModel.Value)
for non-Satan,Inc companies
and
Me.txtinstallcost = DLOOKUP("[Install%]","[MachineModel]","[ModelID]=" &
cbModel.Value)
for Satan, Inc.
There has to be some way to do what I'm thinking of. I just can't find it.
Thanks so much for your help,
Cherish
(e-mail address removed)
Can I do a math function in a DLookup?
My issue is a little evil. I'm trying to create a report that is a balance
sheet of the company's machine sales. Each machine has an install and
warranty amount allotted to it. All manufacturers except one have hardwired
amounts tied to the machine model. Therefore, my code uses a DLookup to pull
up the correct amount if the manufacturer matches, and plinks it into a bound
textbox. This reports perfectly.
Now here's my problem. The red-headed stepchild manufacturer. Let's call
them Satan, Inc. Satan, Inc's install and warranty cost is a multiplier of
the customer purchase price. So right now I do the same thing as above, but
lookup the % multiplier, and list it in the textbox. So it uses the same
field as above, but just lists .15. I would like it to pull from the customer
purchase price, multiply it by "Install%", and plink it into the
abovementoined bound textbox. Then everyone would be happy.
My lookups look like this:
Me.txtinstallcost = DLOOKUP("[InstallCost]","[MachineModel]","[ModelID]=" &
cbModel.Value)
for non-Satan,Inc companies
and
Me.txtinstallcost = DLOOKUP("[Install%]","[MachineModel]","[ModelID]=" &
cbModel.Value)
for Satan, Inc.
There has to be some way to do what I'm thinking of. I just can't find it.
Thanks so much for your help,
Cherish
(e-mail address removed)
Can I do a math function in a DLookup?