Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

# of Records in a report on a Form? Access XP

Status
Not open for further replies.

Dklein

IS-IT--Management
Nov 9, 2001
33
US
Hello,

I am trying to produce a Form that shows statistics based on the values in a report. The values I am trying to pull into a text box on a Form is '# OF RECORDS', and how many records in the report have a value >3 under a Text box called 'TEXT111'.

Now I've managed to do the first bit which was pull the number of records... but not the second as I'm not too good on the old functions etc...

Oh I've just seen that the values will only populate when the report is run... does anyone know how I could automatically refresh the openning of the reports to produce a real-time value?

Sorry for asking so many questions, I was just going to ask the first.

Thanks in advance.

Dave

P.S. I think TT's is great, I have learnt a lot so much since I joint.. I hope I'll be able to give tips soon!!
 
Dave: what your asking is easy enough, just need to be a little more explicit.

In your query criteria you only need to set the conditions to be > x, etc.. provide a tad bit more detail and we'll take a look.
 
To get your Record Count you can use the DCount Function using the Table or Query that has been designated as the RecordSource of your Report:

Dim vRecCount as Long
vRecCount = DCount("*", "qryYourRptQueryName")

Post your SQL from your reports RecordSource query and we can modify it as a new query to the count of the records > {value of text111}.



Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top