Display subform confrol total to mainform (1 Viewer)

moi

Member
Local time
Today, 08:07
Joined
Jan 10, 2024
Messages
273
I have form and subform, i total amountpaid control in subform and put the sum control on subform form header.. Then i want to display that control in the main form. Pls i need..
 
Textbox on main form has expression referening subform textbox.

=[subformcontainername].Form.textboxname
 
I have form and subform, i total amountpaid control in subform and put the sum control on subform form header.. Then i want to display that control in the main form. Pls i need..

Textbox on main form has expression referening subform textbox.

=[subformcontainername].Form.textboxname
No it is not working..
 
What does "not working" mean - error message, wrong result, nothing happens?

Show EXACTLY what you tried if you need more help.
 
What does "not working" mean - error message, wrong result, nothing happens?

Show EXACTLY what you tried if you need more help.
Sir it gives me "#Error. This is what i enter in textbox in main form.. =[Form]![sbfrm_payment]![txtmonthlytotal]
 
Sir can you pls provide the syntax then.. I tried the url but 404 server error.
 
I already provided syntax. So with your object names, try:
=[sbfrm_payment].Form.[txtmonthlytotal]

This assumes sbfrm_payment is name of container control. Container control might have same name as the form it holds. I always assign a different name.
 
I already provided syntax. So with your object names, try:
=[sbfrm_payment].Form.[txtmonthlytotal]

This assumes sbfrm_payment is name of container control. Container control might have same name as the form it holds. I always assign a different name.
Yes sir, i wrongly address the control name.. Pls bear with me, i just started learning ms access.. If you know/have a link where i can download a demo db having the basic features for me to disect and learn from it, it would be appdeciated.. Thank you for time.
 
Yes sir, i wrongly address the control name.. Pls bear with me, i just started learning ms access.. If you know/have a link where i can download a demo db having the basic features for me to disect and learn from it, it would be appdeciated.. Thank you for time.
Yes, you have to get the names correct. That is pretty essential.
Then comes the syntax,
 
I removed the second "dot" and replaced with the "bang" and removed the brackets around the textbox.

=[sbfrm_payment].Form!txtmonthlytotal
 
Either work but bang will prompt list of object names whereas dot lists properties.

In VBA the dot will provoke intellisense listing properties and in some situations object names as well.

Access will likely throw the brackets back in.
 
Yes sir, i wrongly address the control name.. Pls bear with me, i just started learning ms access.. If you know/have a link where i can download a demo db having the basic features for me to disect and learn from it, it would be appdeciated.. Thank you for time.
Take a look at the following:


In the Access Programmers forum see:
Code Repository
Microsoft Access Tutorials
Sample Databases


See if you can get hold of a copy of Access 2000 Developers Handbook Volume 1 by Litwin, Getz & Gilbert
Even the Access 97 version of the same book will be worth buying if you cannot buy the 2000 one. Both old but much is still applicable today.
(don't be tempted with Volume 2 just yet).
Unfortunately they do not do books like that now. In fact they don't write Access books for programmers at all. There are other later books printed but not of the same standard. Today only a few for the Dummies who hope to use Access by clicking around the menus and ribbon here and there.

Maybe also do searches on this forum? Anything you want to know you can safely assume will have been asked many times before. Even an internet search should give results. But better to get the spelling right in your searches.
 
Last edited:
Today only a few for the Dummies who hope to use Access by clicking around the menus and ribbon here and there.
In fact, my bosses a few years back, bought me Access 2007 for Dummies. :)
 

Users who are viewing this thread

Back
Top Bottom