Issue with subform when Main Form is filtered (1 Viewer)

mkdrep

Registered User.
Local time
Today, 05:42
Joined
Feb 6, 2014
Messages
176
The (B4-Filter.jpg) attached is a screen shot of my main form with 2 sub-forms, one on the bottom left and one on bottom right. This issue I am having has to do with the bottom right sub-form, under "Dodge Status Notes Shown Below"

When I work with the data in the main form, many times I filter the information by selecting the date value in the "Revised" field (in this case 11/29/2016) and clicking on the Selection button and choosing "equals 11/29/2016".

Up until recently the main form would filter on that date and come up with a number of records. In each case, BOTH the bottom left and bottom right subforms are populated with information. However, recently the bottom right sub-form's information "disappears" for some reason (as shown in After-Filter.jpg attached). It will not re-appear if I un-filter the selection, but only re-appears after I close out and re-open the main form.

Thank you in advance for any suggestions on fixing this issue.

Mark
 

Attachments

  • B4-Filter.jpg
    B4-Filter.jpg
    83.4 KB · Views: 126
  • Selection.jpg
    Selection.jpg
    4.4 KB · Views: 116
  • After-Filter.jpg
    After-Filter.jpg
    79.2 KB · Views: 126

pbaldy

Wino Moderator
Staff member
Local time
Today, 02:42
Joined
Aug 30, 2003
Messages
36,125
Are there master/child links applied? Would there be records that met those requirements for the selected date/record?
 

JHB

Have been here a while
Local time
Today, 11:42
Joined
Jun 17, 2012
Messages
7,732
Did you try a "Compact & Repair"?
When I look at the pictures, the right subform is filtered when you apply the filter to the main form, (the left subform is not filtered)!
Are you sure you not have any code applied that could cause the problem, (setting a filter or something else)?

Looking at the "B4-Filter" picture you've a filter on the right subform, and not on the left, why that, (it looks like you're not using a Master/Child link)?
If you can't get it, then post your database with some sample data, zip it.
 

Attachments

  • Filtered.jpg
    Filtered.jpg
    73.4 KB · Views: 717
Last edited:

missinglinq

AWF VIP
Local time
Today, 05:42
Joined
Jun 20, 2003
Messages
6,423
A couple of things:
  • First, as mentioned, the errant Subform has been filtered.
  • Secondly, not only is there no data showing, in the right-hand Subform, but the Controls, themselves, don't appear!
Controls don't appear in Form View when three conditions exist at the same time:

  • The Form is Bound to a Table or Query
  • There are No Records in the underlying Recordset or the Recordset cannot be accessed
  • The Form cannot have New Records added
The reasons that a Bound Form cannot have New Records added include:

  1. AllowAdditions for the Form is set to No
  2. The underlying Query the Form is based on is Read Only
  3. User doesn't have Read and/or Write Permission for the Folder where the Data resides or there is a connection problem with the network.
  4. Folder the File resides in (in versions 2007/2010/2013/2016 ) not having been declared as 'Trusted'
  5. Form's Recordset Type is set to Snapshot
Also, in the case of a Subform, no New Records can be added if the Main Form has its AllowEdits Property set to No or if the Subform Control that the Form resides on is Locked.

My guess would be that B, above is in play, with the filtering resulting in No Records being returned, and one of the above conditions that prevent adding New Records exists...you'll have to try to figure that part out.

Linq ;0)>
 
Last edited:

mkdrep

Registered User.
Local time
Today, 05:42
Joined
Feb 6, 2014
Messages
176
A couple of things:
  • First, as mentioned, the errant Subform has been filtered.
  • Secondly, not only is there no data showing, in the right-hand Subform, but the Controls, themselves, don't appear!
Controls don't appear in Form View when three conditions exist at the same time:

  • The Form is Bound to a Table or Query
  • There are No Records in the underlying Recordset or the Recordset cannot be accessed
  • The Form cannot have New Records added
The reasons that a Bound Form cannot have New Records added include:

  1. AllowAdditions for the Form is set to No
  2. The underlying Query the Form is based on is Read Only
  3. User doesn't have Read and/or Write Permission for the Folder where the Data resides or there is a connection problem with the network.
  4. Folder the File resides in (in versions 2007/2010/2013/2016 ) not having been declared as 'Trusted'
  5. Form's Recordset Type is set to Snapshot
Also, in the case of a Subform, no New Records can be added if the Main Form has its AllowEdits Property set to No or if the Subform Control that the Form resides on is Locked.

My guess would be that B, above is in play, with the filtering resulting in No Records being returned, and one of the above conditions that prevent adding New Records exists...you'll have to try to figure that part out.

Linq ;0)>

The issue only started AFTER I used the Compact/Repair feature of Access.

The discussion above triggered an idea on my part and sure enough, for some reason the sub-form on the right was filtering, see attached (issue-w-filter.jpg). Once I removed the "filter", see (issue-w-filter-resolved.jpg) everything worked properly again.

Thank you everyone for your help! Mark
 

Attachments

  • issue-w-filter.jpg
    issue-w-filter.jpg
    34.2 KB · Views: 167
  • issue-w-filter-resolved.jpg
    issue-w-filter-resolved.jpg
    33.3 KB · Views: 144

Users who are viewing this thread

Top Bottom