Results 1 to 5 of 5
  1. #1
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085

    Statistical Sampling

    We are planning to start doing some customer Surveys. I've been tasked with setting up the Database to generate the Surveys for Member Services to Call a Random Sampling of Members Each Year. We are starting with 1 but within the next year that will grow. I've built the tables, forms and reports to be used. The last element is the random selection of members to be called.



    I've created a function to return the Statistical Sample size based on our membership.

    Now to the issue. Out of our membership I need to select the # of members calculated by that function and populate the call list table. The Criteria is that they must be active members and they have not been called within the previous 4 years. We have approx 18,000 members and based on the formula for sample size we must call 388 members. My thought was to create a query that included a column to generate a random number, sort on that number and select the first 388 members from that recordset. the problem is that when I run the query it's the exact same number for every member. How do I get a query to generate a random number for each record and then sort on that number?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Review http://www.rechtman.com/randsql.html

    Can't sort on the random number unless you use UPDATE method that actually stores the generated number in table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

  4. #4
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Thanks orange that article worked.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 08-06-2012, 07:32 AM
  2. SAS(Statistical Analysis System) to SQL
    By Rixxe in forum Programming
    Replies: 4
    Last Post: 10-14-2010, 08:47 AM
  3. Random sampling
    By uscpa in forum Queries
    Replies: 4
    Last Post: 01-23-2010, 03:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums