Code in timer event not working right

T

tkosel

I have some code in a Timer event:

Private Sub Form_Timer()

V_Complete = True

if V_Complete = True then
Me.TotalFines = DLookup("TotalWeightGMS", "PurchasingFinesTotalQuery")
Me.TotalChips = DLookup("TotalWeightGMS", "PurchasingChipsTotalQuery")
Me.TotalBarEnds = DLookup "TotalWeightGMS",
"PurchasingBarEndsTotalQuery")
End If
EndSub

The Me.TotalFines, TotalChips and TotalBarEnds text boxes get populated with
what looks like Japanese symbols. If I run the queries by themselves, they
return what looks like a null value.

However, if I do this:

V_Complete = True

if V_Complete = True then
Me.TotalFines = DLookup("TotalWeightGMS", "PurchasingFinesTotalQuery")
Me.TotalChips = DLookup("TotalWeightGMS", "PurchasingChipsTotalQuery")
Me.TotalBarEnds = DLookup "TotalWeightGMS",
"PurchasingBarEndsTotalQuery")
End If
Me.TotalFines = DLookup("SumOfTotalWeightGMS",
"PurchasingFinesTotalQuery")
Me.TotalChips = DLookup("SumOfTotalWeightGMS",
"PurchasingChipsTotalQuery")
Me.TotalBarEnds = DLookup("SumOfTotalWeightGMS",
"PurchasingBarEndsTotalQuery")
EndSub

It works fine. Any ideas?
 

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