DLookup not getting new data

greenfalcon

Registered User.
Local time
Today, 05:19
Joined
Aug 22, 2006
Messages
34
I have a slight problem.

I have a form that is controlled by vba, it starts out on record one.

it then uses dlookup to check a query

this query is looking at the current forms date text box.

it then retrieves the value that i am looking at, the vba then moves to record two and peforms the same thing, however

when dlookup runs it seems like it not grabbing the new date field from the query... it still shows the old value retrieved the first time.

Now if i perform this action manually on every single record dlookup works. Any ideas, here is my dlookup statement

gal_cost = DLookup("sum_gal", "purchase_fuel_cpg")
gal_purch = DLookup("sum_fill", "purchase_fuel_cpg")

(it essentially looks up fuel data based on a given time frame, the time frame is handled in the purchase-fuel_cpg query which looks at the form i have open
 

Users who are viewing this thread

Back
Top Bottom