N
Neilsky
Access 2003 subform problem with DataEntry=True property:
I have a form with a two subforms on it.
The first subform shows all records that belong to the main form, from
another table, and does NOT allow record additions. It is sorted in reverse
order so that most recent records are visible at the top and old records
disappear off the bottom of the display area (can scroll down to see them).
The second subform is immediately above it, pointing to the same recordset
and set to AllowAdditions=Yes and DataEntry=Yes. This gives the illusion on
the main form that the one and only data entry field for the related table is
at the TOP of the list, rather than the usual bottom.
All works wonderfully well... until I apply any kind of filter to the main
form. At that time the DataEntry subform (second mentioned subform) seems to
lose its DataEntry property or behaviour, and shows the most recent record
instead of a blank record. If I manually expand the form I can see it shows
all records WITH a blank record available at the bottom.
I've tried programatically resetting the subform's DataEntry property to
True via the ApplyFilter event on the main form, but it doesn't fix the
problem. I know that the filter event is running because I've also applied
the Visible=False method and the subform disappears.
Is there a simple way to make a DataEntry=True subform behave properly when
the main form is filtered? Am I doing something dumb or is this a bug in
Access?
I have a form with a two subforms on it.
The first subform shows all records that belong to the main form, from
another table, and does NOT allow record additions. It is sorted in reverse
order so that most recent records are visible at the top and old records
disappear off the bottom of the display area (can scroll down to see them).
The second subform is immediately above it, pointing to the same recordset
and set to AllowAdditions=Yes and DataEntry=Yes. This gives the illusion on
the main form that the one and only data entry field for the related table is
at the TOP of the list, rather than the usual bottom.
All works wonderfully well... until I apply any kind of filter to the main
form. At that time the DataEntry subform (second mentioned subform) seems to
lose its DataEntry property or behaviour, and shows the most recent record
instead of a blank record. If I manually expand the form I can see it shows
all records WITH a blank record available at the bottom.
I've tried programatically resetting the subform's DataEntry property to
True via the ApplyFilter event on the main form, but it doesn't fix the
problem. I know that the filter event is running because I've also applied
the Visible=False method and the subform disappears.
Is there a simple way to make a DataEntry=True subform behave properly when
the main form is filtered? Am I doing something dumb or is this a bug in
Access?