Results 1 to 2 of 2

Filtering Report on opening with correct details

Threaded View

  1. #1
    Registered User
    Join Date
    01-13-2017
    Location
    West Midlands
    MS-Off Ver
    2013
    Posts
    1

    Filtering Report on opening with correct details

    Hi,

    I am fairly new to VBA and have been working on an Access database for my company to keep track of all employee holiday.

    On my form I have the security name/level (which is just their username and their admin privileges). I have a button that I use on the main form to open a report. On this button I am trying to open the report using a technique that says for example:

    If Me.Text21 = "LOGGED IN USERNAME" then
    DoCmd.OpenReport "rptApprovedHol", acViewPreview, WhereCondition-: EmpName = "LOGGED IN USERNAME"

    I probably need to be looking at the table, but i'm unsure of how to string it all together.

    I want the report to open and depending on the logged in user, filter to their holiday records.

    Holiday records are kept in a table called "tblApprovedHol" and the field that I think needs to filter the report would be the "EmpName" in this table.

    I basically want the button to open the report, filter the report by user, by looking at the logged in user and comparing it to the records in the approved holiday table.

    Anyone able to send some guidance for a very confused person? :D

    Thank you kindly!
    Last edited by Anthony.Preedy; 01-13-2017 at 08:43 AM. Reason: Added extra information

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Filtering Report
    By ruchi1127 in forum Excel General
    Replies: 3
    Last Post: 10-16-2015, 12:40 PM
  2. Filtering for the correct duplicate
    By yuenk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-20-2014, 02:09 PM
  3. Need to create summary report based on info available in Details Sheet
    By aleanboy in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-09-2014, 03:24 PM
  4. [SOLVED] Match the details in column A & B and return the correct value
    By jackyong1985 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-01-2012, 03:56 AM
  5. Pivot Table ..Show Details Report
    By tariqnaz2005 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-14-2009, 04:55 AM
  6. Assistance with getting details without opening Excel
    By derivs1 in forum Excel General
    Replies: 0
    Last Post: 06-22-2009, 11:36 PM
  7. Ask if details are correct?
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2009, 02:55 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1