p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Microsoft Office > Access and Access VBA > Access
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 26th, 2006, 10:42 AM
Friend of Wrox
 
Join Date: Apr 2006
Location: Ternat, , Belgium.
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default count data from subform

Hi,

This may seem like a stupid question, but I don't know how to do this...

I have a form with a subform on it. What I would like to have is that on my main form, I have a 'box' that displays me the number of records on the subform. So it should basically count the number of record that or on the subform that is related to the active form. How can I do this?

I have tried to use
=count(Form![FormName]!Form![SubformName]![NameOfFieldToCount])
but this did not work. Does anybody knows how to do this?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 27th, 2006, 12:51 PM
Friend of Wrox
 
Join Date: Apr 2006
Location: Ternat, , Belgium.
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found a way to make it work...

I use

=[Forms]![frmMainForm]![frmSubFormOnMainForm].[Form].[RecordsetClone].[RecordCount]

or in my case

=[Forms]![frmOpvTT]![frmSubformOpvTTDetail].[Form].[RecordsetClone].[RecordCount]

and it works...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigating data in a subform Bob Pierce Access VBA 2 February 1st, 2007 10:58 AM
Subform not displaying data hikinfool Access 8 February 24th, 2006 06:11 PM
Subform on many to many data aware Access 14 August 12th, 2005 03:36 AM
subform data in report exhibitor Access 4 May 16th, 2005 01:19 PM
Display data in a subform marcin2k Access VBA 1 March 1st, 2005 04:37 PM



All times are GMT -4. The time now is 05:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc