Heya guys,
thats for the help with my previous posts, you were all very helpfull. Thats why iv come back
Iv got another issue with a DSUM function that seems to be stuck in a loop.
I have a text box on a forum with its control source set to.....
=DSum("[Line Total]","[ContractMaterials Query]")
The query in question (ContractMaterials Query) returns a list of materials that are related to a certain contract, linked via a ContractID Primary/Forign key.
In the query there are 3 fields im using, the material, the cost, and the quantity. I have setup inside the query an additional field that multiplies the cost and the quantity giving me the total material cost of that particular item for this contract....
Line Total: [Unit Price]*[Quantity]
This is working perfectly, its returning the values with no problem. The query itself is also returing all the corect records when i specify which ContractID i want them for.
However i have a basic text box on the form that i need to add up the line totals of all records that the query returns. As stated above im using the following statement in the control source for the textbox....
=DSum("[Line Total]","[ContractMaterials Query]")
When i open the form the text box appears to be blank, no value, no error, nothing. However when i click on the box the value seems to appear. I thought i may have just been a case of getting the textbox to requery itself when the form loads but i noticed somthing peculier with it. The box seems to flash or flicker when its not highlighted, or has focus.
I can only asume that it must be stuck in some kind of Requery loop where its contrstatly refreshing the value so fast that it cant be see.
I need this box to refesh on a regular basis as the user will be choping and chainging the materials all the time. I have gone though all the VBA code i have written for it and for the life of me i cannot see a reason for it being stuck in a loop.
Has anyone else had this issue or knows of a work around?
Cheers guys you are the best