Results 1 to 2 of 2
  1. #1
    Benjix1991 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2018
    Posts
    5

    Random record search

    Hi all,

    I have being reading on the internet looking for a solution but I've been unable to find any that help me.

    I have a table called Awards with a PK named transNo. Part of my organisation's guidelines are that a manager would check 10% of these for compliance every month.



    I had hoped to allow the user to enter the date range for the query (fairly easy as not defining causes access to prompt the user) which returns a random 10% subset for the manager to check.

    I would also like to specify the office in which the manager operates so they aren't looking at other offices records. The awards table has a FK called custRef, to the customers table. The customer table includes a FK staffNo of the staff assigned to that customer to a Staff table and the Staff table has a FK names teamNo which links to the table Team wherein the staff's team's office number is saved.

    I.e. (Awards.custRef = Customer.custRef) AND (Customer.staff = Staff.staffNo) AND (Staff.teamNo = Team.teamNo) AND (Team.officeNo = "O001") AND (dateAwarded >= [Start Date]) AND (dateAwarded <= [End Date])

    Ideally this could be amended in VBA to define the office number based upon Current user.

    I have had a load of bother doing this, any help would.be appreciated.

    Thanks,
    Ben

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

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

Similar Threads

  1. Replies: 19
    Last Post: 04-09-2018, 05:56 PM
  2. Replies: 2
    Last Post: 05-29-2015, 11:16 AM
  3. Random Record Within Group
    By warrenk in forum Queries
    Replies: 2
    Last Post: 10-21-2013, 02:17 PM
  4. Random Record pull
    By Madmax in forum Access
    Replies: 2
    Last Post: 06-28-2011, 08:26 PM
  5. random record
    By wasim_sono in forum Programming
    Replies: 1
    Last Post: 02-06-2008, 02:42 PM

Tags for this Thread

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