DLookup Question

Benjamin Bolduc

Registered User.
Local time
Today, 14:34
Joined
Jan 4, 2002
Messages
169
Hi everyone!

I'm having problems with the Dlookup function. I've searched the archives and tried to make my own code but it isn't working. Here's the code I've made so far (Don't laugh)

=DLookUp("Total","Tracking","Item =" & Reports!Main_Report!Item & "'")


I'll explain what I'm trying to do...

I have a report that keeps track of a weekly inventory. There are about 53 different products on the report. I need to add a feild that subracts last weeks total from this weeks total. (The [Total] is a stored number), so we can see how many we have used.

The report is grouped by Item with all the dates and thier totals under it.

This is what i'd like it to look like:

Yellow Caps

Date Total Difference
5-Jul 1000
12-Jul 800 200
19-Jul 500 300
26-Jul 400 100

Black Caps

etc..


If anyone can figure out my Dlookup code or knows of an easier way of doing this, please let me know. I'd really appreciate any help :)

You guys are great!
Ben
 
You can use the Tag property of the report to calculate the variance, or the PrevRecVal function to retrieve it.
 
That sounds like a good idea. But what would I type in the Tag Property Field? Also, I couldn't find any mention of the PrevRecVal function in any help files. Thanks for your help!!
 
If someone helps me out with this, I'll say " Thank you, You're a great person!" and that would probably make you feel good about yourself. See, it would definatly be worth it ;)
 
Thank you Rich! You're a great person! That was a perfect example, I got everything I needed and more. I'll send some good karma your way today ;)
 

Users who are viewing this thread

Back
Top Bottom