Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...just the few hours I've spent on this site I have learned a lot. I can now implement features that will be very useful to my company, and some of those I never knew existed..."

Geography

Where in the world do Tek-Tips members come from?

Text Box in MainForm Referencing "count" in subformHelpful Member!(2) 

kattzndagz (TechnicalUser)
13 Jul 12 2:55
I have a main form with a subform and i am counting the number of records in the subform (it will be the number of invites sent)

The control in my [eventattendsubform] is called [countpeople] and its control source is count(*) This is placed in the footer of my subform

My control in my main form is [NoInvtnSent] and its control source is =[Forms]![eventattendsubform]![countpeople] I used the expression builder to ensure i got all the names correct.

This doesn't work as the it comes up with #Name?

I have also tried the following without success geting #Name?:

=[eventattendsubform].[Form].[RecordsetClone].[RecordCount]


It is probably something simple but i can't see it

can anyone help

thanks
dhookom (Programmer)
13 Jul 12 10:16
Try:

CODE

=[Your Subform Control name].Form.countPeople 

Duane
Hook'D on Access
MS Access MVP

Helpful Member!  MitchRandall (Programmer)
13 Jul 12 10:26
You should be using this syntax:

=[eventattendsubform]![Forms]![countpeople]

Start with the subform's control name, then it's form collection, then the control in the form's collection.
Helpful Member!  dhookom (Programmer)
13 Jul 12 10:29
MitchRandall,
Welcome to Tek-Tips. Great comment on "subform's control name" which can be confusing. However the middle section is simply "form" since it is reference the control's form object and not really a collection.

Duane
Hook'D on Access
MS Access MVP

kattzndagz (TechnicalUser)
16 Jul 12 20:32
Thanks Guys

This is exactly what worked for me

=[eventattendsubform].[Form].[countpeople]

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close