Link to home
Start Free TrialLog in
Avatar of LJG
LJG

asked on

Funny behavior reading controls on Subform / Access 2010 / Just want to know.

Facts
Version:  Access 2010
I have the below on a form to see the total of the subform.
                    =[Subform_01].[Form]![txtTot_Depositing]
It works fine on my computer and I've used the similar on forms - reading of subform values on multiple different applications at multiple clients in the past.  The worst that has ever happened - It took 3 to 5 seconds to populate.
I have the appropriate indexes.
The current client (Hospital - can't change anything on the machine) just sits there for a full minute and it doesn't populate.

They have the exact same problem if I try to read from a query
=DSum("[Amount_Owed]","qry_Clients_Invoice","[ClientIdd] = [txt_Id_Number]")

Question
I can solve the problem, my question is mainly has anyone seen this happening and know why?   Is it low memory?   Is it we are close to holloween?  :)

I can solve the problem
I can solve the problem by using a dao recordset - run the code and populate the field.
1) I like just reading the control on the subform because if the user is moving through 30 records, Access doesn't slow things down to figure the value.
2) I always want a better understanding of WHY something happens I didn't expect (Why the above is not populating).  It makes me a better programmer.


Just to repeat - It's a Hospital - can't change anything on the machine - Only changes can be in my database.
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Slow network?

Is this computer hard wired to the network or or Wi-Fi?
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LJG
LJG

ASKER

Answers:
   * Don't Know   -  Slow network
   * Yes  -  Computer hard wired
   * Yes - Access database "backend" - (Against my recommendation)
   * Yes - SINGLE machine
   * Control Source txtTot_Depositing
           =(nbrRound(DSum("[Amount_Paying]","qry_Inv_Deposit_Form_Sub_Invoices")))
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LJG

ASKER

Answers - #2
   * Yes  - single backendDB on a server,
   * Yes  - user has their own copy of the front end of their workstation
   * No  - hundreds of thousands of records - The application is just starting - Less than 100 records

   * Yes  - This is the only aspect of this database that is slow.  (It's happening on two different forms - but the same concept)

   * Don't Think so  -  query is complex, - qry_Inv_Deposit....    
                - It has 3 IIf statements
                - a few field additions
                - a few places it's reading a field from a
                      form --> [Forms]![frm_Inv_Deposit]![cbo_Client_ID]
Then the quick thing to try would be to run the compact repair utility...

I see no need to this one value to take that long to generate...

So lets see if the other experts have any ideas...
Avatar of LJG

ASKER

Thanks