Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Total on subfrom to mainform

Geek News

Total on subfrom to mainform
"chopper7898 via AccessMonster.com" <u43982[ at ]uwe> 11/12/2008 1:32:44 AM
I've done this before, but it's not working on the main form. I keep getting
#Name?
The MainForm and Subform are not linked, would that make a difference?

I have a Datasheet subform inbedded in a Mainform so I can have room for
command buttons to open reports.

I place an unbound box in the footer of the subform to total project costs
and placed another on the mainform to show it.

Subform footer: name of unbound "ProjectTotals" control source =Sum([Cost])
Unbound on Mainform: =[sfrm_ProjectsDatasheet].Form!ProjectTotals

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Re: Total on subfrom to mainform
"Allen Browne" <AllenBrowne[ at ]SeeSig.Invalid> 11/12/2008 3:57:27 AM
Looks right. The linking won't cause the problem.

Perhaps the Name of the subform control is different than the name of the
form you load into it (its SourceObject.) Open the main form in design view.
Right-click the edge of the subform control, and choose Properties. What is
its Name (on the Other tab of the Properties box)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"chopper7898 via AccessMonster.com" <u43982[ at ]uwe> wrote in message
news:8d0e0c162934d[ at ]uwe...
[Quoted Text]
> I've done this before, but it's not working on the main form. I keep
> getting
> #Name?
> The MainForm and Subform are not linked, would that make a difference?
>
> I have a Datasheet subform inbedded in a Mainform so I can have room for
> command buttons to open reports.
>
> I place an unbound box in the footer of the subform to total project costs
> and placed another on the mainform to show it.
>
> Subform footer: name of unbound "ProjectTotals" control source
> =Sum([Cost])
> Unbound on Mainform: =[sfrm_ProjectsDatasheet].Form!ProjectTotals

Re: Total on subfrom to mainform
"chopper7898 via AccessMonster.com" <u43982[ at ]uwe> 11/13/2008 1:19:08 AM
Thanks Allen. I had already done that several times. I just got it to work.
I didn't think that it mattered but I changed the title of the subform after
I placed it on the MainForm, but the property showed the new name of the
subform so I thought it was OK, but I guess not. I deleted the subform and
reinstalled it again on the MainForm and the Total box works.
Thanks again for your help, that was very nice of you providing a quick
response.

Allen Browne wrote:
[Quoted Text]
>Looks right. The linking won't cause the problem.
>
>Perhaps the Name of the subform control is different than the name of the
>form you load into it (its SourceObject.) Open the main form in design view.
>Right-click the edge of the subform control, and choose Properties. What is
>its Name (on the Other tab of the Properties box)?
>
>> I've done this before, but it's not working on the main form. I keep
>> getting
>[quoted text clipped - 10 lines]
>> =Sum([Cost])
>> Unbound on Mainform: =[sfrm_ProjectsDatasheet].Form!ProjectTotals

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net