Results 1 to 4 of 4
  1. #1
    P5C768 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95

    Filter Split Form by Date Using Unbound Text Box

    I have a split form that is bound to a union query that consolidates data from 5 tables. Right now, when the split form is open, it shows all data. I would like users to be able to use a unbound start date (and eventually end date) text box I have created to filter the form by a date field in the table. However, when I run my embedded macro, the filter returns no results. I would like to keep the code in the embedded macro if possible but could switch to VBA if needed. Here is the macro code I am currently using:



    Click image for larger version. 

Name:	Filter.png 
Views:	12 
Size:	120.3 KB 
ID:	12183

    Any help is greatly appreciated! Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Are you aware a UNION query is not editable? Purpose of form is to just view records and to open another form or report for selected record?

    I don't use macros and I can't readily see anything wrong with what you show - it looks okay.

    Maybe create a VBA procedure just as a test to see if the filter setting will work and if successful go back and try to replicate in macro.
    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
    P5C768 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95
    Yes, purpose is to view records and open report. VBA works, just can't get the macro to work, not really sure why.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I never use Filter property of report. I use the WHERE CONDITION argument of DoCmd.OpenReport. I think WHERE CONDITION can be replicated in macro.
    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.

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

Similar Threads

  1. Filter Split Form using ListBox and .ME
    By clchris_80 in forum Access
    Replies: 3
    Last Post: 01-17-2013, 07:30 PM
  2. Unbound Combobox Filter By Date Criteria
    By burrina in forum Forms
    Replies: 8
    Last Post: 01-04-2013, 02:24 PM
  3. IIF formula in an unbound text box using date()
    By probablyjoel in forum Forms
    Replies: 3
    Last Post: 04-20-2012, 12:03 PM
  4. Unbound Combo Box to filter form
    By Firefighter22 in forum Forms
    Replies: 4
    Last Post: 08-31-2011, 03:39 PM
  5. Apply Filter based on unbound date boxes
    By anoob in forum Access
    Replies: 3
    Last Post: 01-21-2011, 05:26 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