Results 1 to 2 of 2
  1. #1
    sabre1 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    22

    Set Filter and FilterOn from a pop-up form

    I am having huge problems with the coding of using a pop-up form which gives the user options which they can select which then filters a report. I have tried to use a code that i found on the internet however i cannot seem to get it to work and i was wondering whether someone had a simple code using just one combo box and one button for now.

    Here are a few details:


    -Report i want to filter called Entity List
    -Field i want in my combo box which is also on my report called Entity_Client from the table Entity_Info

    Any help would be greatly appreciated thanks.

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    To filter the Entity_Client from a pop up form which is unbound and has a combox (e.g. combo0) with Rowsource Entity_Client run this code from the command button on the pop up form:

    Dim strCriteria as String
    Dim strDocName as String

    strCriteria="[Entity_Client]='" & Me.Combo0 & "'"
    Docmd.OpenReport "Your Report Name", acViewPreview, , strCriteria

    Note: I have assumed that Entity_Client is a text field.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-25-2013, 10:56 AM
  2. how to set up filter in form
    By Brigitt in forum Forms
    Replies: 1
    Last Post: 10-28-2010, 07:39 AM
  3. Filter by form help
    By kgriff in forum Forms
    Replies: 8
    Last Post: 09-12-2010, 08:42 AM
  4. Form Filter
    By smikkelsen in forum Forms
    Replies: 5
    Last Post: 07-13-2010, 08:21 PM
  5. Form Filter
    By catat in forum Forms
    Replies: 5
    Last Post: 05-05-2010, 02:29 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