Results 1 to 3 of 3
  1. #1
    brandonze is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Mar 2011
    Posts
    49

    QBF Questions

    Hello,

    I am new to using QBF's. I always went in the query and entered the Criteria. However, I am leaving the database I created to people that are pretty much DB dumb. So I am creating a QBF for them to generate the required query to generate the correct report.

    The problem is multifaceted.

    First off, I have an employee that is attending the conferance. He is also allowed two family members that we will pay travel to attend. So I have to initial criteria of event date and event location to give me all the emploees that are attending an event.



    Im good up to there. The Finace office requires that the family members be put on different types of travel vouchers depending on age. For example, family member (FM) 1 is over 18 goes on one type, if FM1 has a child (FM2) under 18 it is another type, and if FM1 and FM2 are under 18 yet a third type.

    The easy way to do this is to run three seperate QBF's to generate the three queries needed.

    Is there anyway to do this off of one qbf?

    Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    VBA code. Probably many ways to do this. Here is one idea, outlined.

    Open recordset to get all family members filtered to specific employee ID.

    Search the recordset for records that meet report criteria. Do this in a loop for 3 iterations (3 types of reports).

    Generate appropriate report if criteria met.

    Or instead of reading a recordset, use DLookup to search for record in table. Still need 3 iterations in a loop or 3 DLookups in sequence.
    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
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    How is your data stored? is the primary person and all the people going with him stored on the same table? Or have you got subsidiary tables for each primary person attending a conference? Are you storing the age of the person with the employee attending the conference? Are you just trying to evaluate which type of voucher is needed for a particular person to travel?

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

Similar Threads

  1. Relationship questions
    By ertjeffrey in forum Access
    Replies: 3
    Last Post: 01-24-2011, 04:50 PM
  2. Introduction and Questions
    By sblanky in forum Access
    Replies: 2
    Last Post: 01-19-2011, 08:12 PM
  3. New Guy Structure questions
    By cgjames in forum Database Design
    Replies: 11
    Last Post: 01-19-2011, 07:16 AM
  4. First Database Questions...
    By qu1ckdry in forum Database Design
    Replies: 0
    Last Post: 03-01-2010, 09:33 AM
  5. New to this forum and have questions
    By Sinatra Fan in forum Access
    Replies: 4
    Last Post: 04-14-2006, 06:53 PM

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