FilterOn where no records are returned (1 Viewer)

Dumferling

Member
Local time
Today, 17:12
Joined
Apr 28, 2020
Messages
102
I set a FilterOn on a form but in some instances this gives me no records (the filter works fine - it is just that in some instances there are no records to return). In this instance the result is that the form moves to a new record. I then check this with RecordCount (RecordCount = 0) and set the FilterOn property to False. The form shows "Unfiltered" but the records returned stay at 1 and do not return to the full number of records. I tried using Undo to clear the blank record which the form is waiting to have filled but this is not working.

When I clear the filter (FilterOn = False) how do I get the records returned to be the full number of records in the recordset? And how do I exit the expectation from Access that the user complete a new record?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 16:12
Joined
Feb 19, 2013
Messages
16,607
try setting the form allow additions to false
 

HalloweenWeed

Member
Local time
Today, 11:12
Joined
Apr 8, 2020
Messages
213
try setting the form allow additions to false
If you are using vba to set the filter, try adding:
Code:
MyForm.AllowAdditions = False
when turning on the filter, then if needed, use same to turn additions back on after turning off the filter.
 

HiTechCoach

Well-known member
Local time
Today, 10:12
Joined
Mar 6, 2006
Messages
4,357
If you will not need to add records on the form, I like to change the recordset type to a snapshot.
 

Micron

AWF VIP
Local time
Today, 11:12
Joined
Oct 20, 2018
Messages
3,478
Or do more than turn the filter property "off" - set it to "" first, or do that and don't turn it off at all. It should not matter what the field data type is because the filter property value is a string.
 

Users who are viewing this thread

Top Bottom