Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2011, 03:28 PM
Registered User
 
Join Date: Dec 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ttitto
Default Report from random records of a query

I would like to ask you how can I solve the following problem. I have a query with a number of records (let's say with 35 records) I want to make statistical evaluations in a Report but for that I need only 30 records. I want to have only 30 RANDOM records in my report from the 35 records in the query. How can I have this solved? Thank you in advance for any proposition!
 
Old August 31st, 2011, 10:37 AM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

What I do is add a random number to each record. I use a query to sort bu the random number and use TOP 30.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old August 31st, 2011, 11:26 AM
Registered User
 
Join Date: Dec 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ttitto
Smile

Really many many thanks to you, HiTechCoach. This is absolutely usefull for my purpose
 
Old August 31st, 2011, 12:05 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

You're welcome.

If you need further assistance we will be here.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
csv with multiple records in random order biztalk xs2bharat Biztalk 0 May 2nd, 2007 07:09 AM
ongoing problem with random records....HELP! ps124 ASP.NET 1.0 and 1.1 Basics 0 March 26th, 2004 05:35 PM
help with random records ps124 ASP.NET 1.0 and 1.1 Basics 0 March 14th, 2004 10:57 PM
Generating 5 unique random records from a database ps124 ASP.NET 1.0 and 1.1 Basics 2 March 8th, 2004 05:59 PM
random records from database HammR PHP Databases 1 December 11th, 2003 02:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.