Results 1 to 4 of 4
  1. #1
    Jobadiah is offline Novice
    Windows 11 Office 365
    Join Date
    Feb 2023
    Posts
    2

    Subform filter applying to wrong field

    I have a subform with a datasheet view. When I attempt to use the column filters on the "Student" field, it is applying the filter to the wrong field.



    For example, if I select the filter for "Student" and choose Text filter->Contains"->Test1, it should filter to show me all records with "Test1" as part of the student name.
    Click image for larger version. 

Name:	filter1.jpg 
Views:	7 
Size:	63.4 KB 
ID:	49807

    Instead, it returns nothing and on further inspection it has applied the filter to the grade (stu_level_code).
    Click image for larger version. 

Name:	filter2.JPG 
Views:	7 
Size:	26.1 KB 
ID:	49808



    I do not have any code attached to any events on the "Student" field, so I have no idea why this is happening or how to begin troubleshooting it. Any advice would be appreciated.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,007
    You are not showing a clear picture.?

    Your first shows filter on Student, yet the second shows it is filtered on grad?

    When I try and filter I am shown all the distinct entries as well?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,122
    Check if the subform or its record source have a filter saved. Is there any code behind the subform or the main form that might impact this (not only the Student "field")?
    I see your table is linked form SQL server, does it have a primary key?
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    Jobadiah is offline Novice
    Windows 11 Office 365
    Join Date
    Feb 2023
    Posts
    2
    Well, it turns out the issue was with some bad data that was causing an error in a view that was being used as the record source.

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

Similar Threads

  1. Replies: 2
    Last Post: 07-09-2018, 10:08 AM
  2. Replies: 4
    Last Post: 06-26-2017, 12:41 PM
  3. Replies: 1
    Last Post: 04-30-2015, 08:33 PM
  4. Replies: 4
    Last Post: 04-22-2013, 06:45 AM
  5. Access Reports - Applying a subform filter
    By AMCUser in forum Queries
    Replies: 13
    Last Post: 06-25-2010, 07:32 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