Results 1 to 3 of 3
  1. #1
    DougieJ is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2015
    Posts
    12

    How do I control Access form filter if no records found?


    I have a form which allows the usual filtering by the user. For example, the user can right-click a displayed field and select 'Text filters'...'Equals...' and type a target string. This works fine if the target string is found, but if it is not the form goes into (New) record mode. The same thing happens if I try to place a filter on the table for a non-existent value - it moves to the 'add record' line. This has only recently begun to happen, and doesn't happen always. The form shows an editable dataset but disallows additions. Is there any way I can intercept the filter and have a meaningful message displayed if no match is found for the target string or number? I know I can work around by writing my own search code, but I'd rather use the Access front end as it is.

  2. #2
    DougieJ is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2015
    Posts
    12
    This appears to be a bug in Access 2010. If a filter returns an empty dataset, then a blank screen should be displayed when 'Allow Additions' = No in the form properties, otherwise a new record. However, intermittently a form with 'Allow additions' =No will return a new record instead of a blank form.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    That is going to happen if the form's properties do not allow additions or the form's recordsource is not updatable. Perhaps you can instruct the users to remove the Filter via the "Toggle Filter" tool.

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

Similar Threads

  1. Filter combo box data based on a form control
    By onechriswhite in forum Forms
    Replies: 6
    Last Post: 08-29-2015, 09:21 PM
  2. Replies: 9
    Last Post: 02-24-2015, 11:19 AM
  3. Replies: 2
    Last Post: 01-16-2015, 05:56 AM
  4. My field is not found in Control Source List
    By eemiller1997 in forum Access
    Replies: 6
    Last Post: 10-25-2012, 01:49 PM
  5. Replies: 2
    Last Post: 04-17-2012, 12:56 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