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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 97, pull random records 1

Status
Not open for further replies.

DWH

Technical User
May 2, 2001
3
US
We have an Access 97 database where customer service reps log telephone calls coming in. The boss wants us to survey callers about their satisfaction with the service they received. For a given week, I need to pull 10 records for each customer service rep. Fields include a ticket number (autonumber field), rep name, caller name, phone and similar information. I think I need to create a query that pulls random ticket numbers, and then populates a new table with that info. I would appreciate any advice you can give me on doing this.
 
You can use the random funtion in the criteria of your query on the field you wish to randomly pull from. This example here will randomly pull ticket numbers 1 thru 10 each time it is run if used as a criteria expression for the TicketNumber field.

Int(10*Rnd())+1

Customize this as you need. ljprodev@yahoo.com
Professional Development
MS Access Applications
 
Thanks, Terry! The tutorial is excellent!:)I
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top