A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Forms and suforms



 
 
Thread Tools Display Modes
  #1  
Old December 12th, 2005, 10:28 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Forms and suforms

I have an Orders main form with a subform similar to the Northwind orders
form but bigger. Both the main form and subform are based on multi-table
queries.

The subform default view is Datasheet and displays 12 controls. 3 controls
are based on calculated fields in the underlying query. A control displaying
the sum of each of these 3 controls is displayed in the footer of the
subform.
I wish to display this information in 3 controls on the main form as the
subform default view is Datasheet and the controls in the footer are not
displayed on the subform.

The problem I have is I get "#Name?" error in the controls on
the main form where I want to display the totals calculated in the controls
in the footer of the subform.

I've think I have done things according to the Acces help file "About
calculating totals in a subform and displaying it on a form", but I can't get
it to work.

Any suggestions gratefully accepted.

Thanks in advance.

--
paulu
  #2  
Old December 13th, 2005, 01:31 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Forms and suforms

Paulu,

As there are a couple of approaches to doing this, could you
supply some more details of how exactly you are attempting
to do it? The #NAME error can commonly result from small
errors in the syntax of how you are referring to your
controls, especially when you are referencing things in a
subform or from a subform to a parent form.

--
Gary Miller
Sisters, OR



"paulu" wrote in message
...
I have an Orders main form with a subform similar to the
Northwind orders
form but bigger. Both the main form and subform are based
on multi-table
queries.

The subform default view is Datasheet and displays 12
controls. 3 controls
are based on calculated fields in the underlying query. A
control displaying
the sum of each of these 3 controls is displayed in the
footer of the
subform.
I wish to display this information in 3 controls on the
main form as the
subform default view is Datasheet and the controls in the
footer are not
displayed on the subform.

The problem I have is I get "#Name?" error in the controls
on
the main form where I want to display the totals
calculated in the controls
in the footer of the subform.

I've think I have done things according to the Acces help
file "About
calculating totals in a subform and displaying it on a
form", but I can't get
it to work.

Any suggestions gratefully accepted.

Thanks in advance.

--
paulu



  #3  
Old December 13th, 2005, 04:50 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Forms and suforms

Gary,

The query which is the record source for the subform has 3 calculated fields
one of which I put in below.

ExtendedPrice:
([UnitSellPrice]+[UnitCostFIS])*[ShippedQuantity]*(1-[Discount])

The other 2 are similar.

The footer of the subform has a control with the name;

TotalProductSell

and the control source;

=Sum([ExtendedPrice])

The main form has a control which has a control with the name;

InvoiceSubtotal

and control source;

=[frmOrderSubform].[Form]![TotalProductSell]


And I continue to get #Name? apearing in my control.

If you can help that would be great.

Cheers

--
paulu


"Gary Miller" wrote:

Paulu,

As there are a couple of approaches to doing this, could you
supply some more details of how exactly you are attempting
to do it? The #NAME error can commonly result from small
errors in the syntax of how you are referring to your
controls, especially when you are referencing things in a
subform or from a subform to a parent form.

--
Gary Miller
Sisters, OR



"paulu" wrote in message
...
I have an Orders main form with a subform similar to the
Northwind orders
form but bigger. Both the main form and subform are based
on multi-table
queries.

The subform default view is Datasheet and displays 12
controls. 3 controls
are based on calculated fields in the underlying query. A
control displaying
the sum of each of these 3 controls is displayed in the
footer of the
subform.
I wish to display this information in 3 controls on the
main form as the
subform default view is Datasheet and the controls in the
footer are not
displayed on the subform.

The problem I have is I get "#Name?" error in the controls
on
the main form where I want to display the totals
calculated in the controls
in the footer of the subform.

I've think I have done things according to the Acces help
file "About
calculating totals in a subform and displaying it on a
form", but I can't get
it to work.

Any suggestions gratefully accepted.

Thanks in advance.

--
paulu




  #4  
Old December 13th, 2005, 05:13 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Forms and suforms

Palau,

The name of your subform is frmOrderSubform right? What is
the name of your subform control that displays the subform?
That is the name that you need to use in the subform
reference, not the name of the subform itself.

=[NameOfSubFormControl].Form!TotalProductSell

--
Gary Miller
Sisters, OR


The main form has a control which has a control with the
name;

InvoiceSubtotal

and control source;


=[frmOrderSubform].[Form]![TotalProductSell]


And I continue to get #Name? apearing in my control.



  #5  
Old December 15th, 2005, 12:25 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Forms and suforms

Thanks Gary,

That was my problem. The name of the control that displays the subform is
different to the name of the form. It works fine now.

Thanks again,

Cheers,
--
paulu


"Gary Miller" wrote:

Palau,

The name of your subform is frmOrderSubform right? What is
the name of your subform control that displays the subform?
That is the name that you need to use in the subform
reference, not the name of the subform itself.

=[NameOfSubFormControl].Form!TotalProductSell

--
Gary Miller
Sisters, OR


The main form has a control which has a control with the
name;

InvoiceSubtotal

and control source;


=[frmOrderSubform].[Form]![TotalProductSell]


And I continue to get #Name? apearing in my control.




  #6  
Old December 15th, 2005, 05:48 AM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Forms and suforms

Glad to have been of some help.

Good luck with your project.

--
Gary Miller
Sisters, OR


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.