Results 1 to 3 of 3
  1. #1
    chapraz8 is offline Novice
    Windows 10 Access 2019
    Join Date
    Nov 2022
    Posts
    1

    Access Form button "where" condition

    In my access database there is a form that shows the staff of my company. I have a button that I want to open the report of the staff that is currently open in the form. What code should I place in the bulid event's where field in order to open the report of the staff?
    Attached Thumbnails Attached Thumbnails 11.png  

  2. #2
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    maybe Where Condition would be Forms!frmStaff.StaffID - use your own form and field names. StaffID would be the field that uniquely id's the staff member.
    or create a filter query that does this for you and use that name in the filter box.
    Most of us here don't use macros so guidance can be a bit weak at times.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    the query in the report has the where:

    select * from table where [staffID]=forms!fMyForm!cboStaffID

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

Similar Threads

  1. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  2. Replies: 1
    Last Post: 01-16-2014, 12:33 PM
  3. Replies: 8
    Last Post: 10-24-2012, 12:47 PM
  4. Replies: 11
    Last Post: 03-29-2012, 02:32 PM
  5. Replies: 0
    Last Post: 01-11-2012, 12:34 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