Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Query Calc Slow to Update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 17 Apr 2008 20:41 GMT
Hi All,

Not sure whether this is query or form related hence the post to both NG's.
Hope this is ok.

I think what I am doing is pretty basic. I have a subform that lists the
components of a product. The query on which the subform is based calculates
qty*cost=TTL to give a total. This works fine.

The main form has a field with a DSum function that sums the totals as
follows for the component ref. The DSum function is below. The results of
the Dsum doesn't update immediately or even after going to the previous
record and back again. Eventually it does but I can't see why there is any
delay at all or what eventually causes it to update.

Can anyone help please?

=DSum("[q_Prod Components]![TTL]","[q_Prod Components]"," [q_Prod
Components]![Prod Ref] =" & 'Ref')

Ta.
Bill
Dale Fye - 18 Apr 2008 13:22 GMT
Bill,

Your DSUM appears to be formatted improperly.

The first part of the criteria portion is probably correct, but the last part

 & 'Ref'

does not make any sense.  What you have now will try to compare [Prod Ref]
to the literal string "Ref".  Actually, I would think what you have posted
would actually generate an error.

If you have a textbox on your form called txtRef, then it might look like:

=DSum("[q_Prod Components]![TTL]", _
           "[q_Prod Components]", _
           "[q_Prod Components]![Prod Ref] =" & me.txtRef)

If the value in txtRef is a string instead of a number, it should look like

=DSum("[q_Prod Components]![TTL]", _
           "[q_Prod Components]", _
           "[q_Prod Components]![Prod Ref] ='" & me.txtRef & "'")

Note that I have used a single quote just to the right of the = , and have
wrapped a single quote between double quotes on the end.

HTH
Dale

Signature

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.

> Hi All,
>
[quoted text clipped - 18 lines]
> Ta.
> Bill
Bill - 18 Apr 2008 15:40 GMT
Thanks Dale,

No questions back at the moment. I will look at what you have posted and
give it a try.

I can assure you however that i don't get an error, just a delay. I think
you are on to something with the way I have done the 'Ref' bit though!

Thanks again.
Bill.
Bill - 18 Apr 2008 16:06 GMT
Thanks Dale, the value is txt so you second suggestion worked, except that I
got a #Name? error initially but removing the me part sorted it. Still a
delay in updating though!
Dale Fye - 18 Apr 2008 17:12 GMT
Bill,

Are you running on a network or on your desktop?

Is the application split (front / back)?  If so, where is does each part of
the application reside?

When do you expect that field to change?  After you have made a change in
the subform?  If so, you could use an event in the subform to force that
control in the main form to requery with code similar to

  me.parent.txt_Total.Requery

I'm not sure where (which event of the subform) you would put this code, but
I would suspect it would be in an event procedure that adds a new component
or something like that.

HTH
Dale
Signature

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.

> Thanks Dale, the value is txt so you second suggestion worked, except that I
> got a #Name? error initially but removing the me part sorted it. Still a
> delay in updating though!
Bill - 24 Apr 2008 18:06 GMT
Thanks Dale, that has helped.
Regards.
Bill.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.