Click here to Skip to main content
15,887,881 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
How to get "Footer row"(Sum or Count) of a Access Form (DataSheet)
I search the Total rows in Form Controls but I am not getting anything for it.

What I have tried:

C#
ACCESS.DoCmd.OpenForm("FormName");
ACCESS.Controls cntrls = (ACCESS.Controls)app.Forms["FormName"].Controls;
Posted
Updated 22-Aug-19 4:51am
v9
Comments
IamWsk 30-Aug-16 10:41am    
Any Idea @Richard MacCuthan?
Maciej Los 30-Aug-16 10:44am    
What are you talking about?
All you need to do is to get the count of records of bounded datasource for that form.
IamWsk 30-Aug-16 10:47am    
There is a option in Access Forms to add Sum or count for Datasheet form I need that property by using interop
IamWsk 30-Aug-16 10:48am    
I want to validate that property whether user added sum or not
Maciej Los 30-Aug-16 12:47pm    
Well, i'm afraid, you cannot access to closed form. You need to open it, then you'll be able to access to its controls.

1 solution

Please, read my comment to the question. As i mentioned there: You need to open it (form) to be able to access to its controls.

See: How to automate Microsoft Access by using Visual C# [^] - Show And Edit an Access Form part.
 
Share this answer
 
v2
Comments
IamWsk 8-Sep-16 4:06am    
I open the form then only I am using my above code.
But the total rows where all the columns sum or totals appears where can i find that.
IamWsk 22-Aug-19 10:52am    
Any clue?
Maciej Los 22-Aug-19 11:34am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900