K
Kurt Wimberger via AccessMonster.com
Hi all:
I am having an issue with Access nav buttons, events and a filter.
I have a form that filters a subform using Form_Current() as the user
scrolls through the main form using the Access nav buttons. Inside the same
event I call a subroutine to update an unbound field to display some
details of what is about to happen. Works great 99% of the time.
But if the particular filtering happens to return no records in the
subform, then the unbound txt field is not updated. It shows the data from
the last time the filtering had records returned.
Let's say the user then clicks 'next record' on the main form 3 more times
without the subform filter returning any records. On the 4th click the
subform returns records but the txt field doesn't update. It will update as
you click to the next record, but it seems to hesitate on the first record
that returns a filtered record after a record that returns no filtered
records.
So it seems to me that the txt field update is somehow being tied to the
success (or return of data) from the subform filter. I don't know why that
should be since I call them individually.
I even went so far as to build a separate cmdButton to do the 'Next Record'
nav and added the update script to its click event, but it performs the
same way. And, I should mention that the txt field update code is executed
(or should be) BEFORE the filter, so I would have thought the filter's
success would have nothing to do with it.
Any thoughts?
Kurt
I am having an issue with Access nav buttons, events and a filter.
I have a form that filters a subform using Form_Current() as the user
scrolls through the main form using the Access nav buttons. Inside the same
event I call a subroutine to update an unbound field to display some
details of what is about to happen. Works great 99% of the time.
But if the particular filtering happens to return no records in the
subform, then the unbound txt field is not updated. It shows the data from
the last time the filtering had records returned.
Let's say the user then clicks 'next record' on the main form 3 more times
without the subform filter returning any records. On the 4th click the
subform returns records but the txt field doesn't update. It will update as
you click to the next record, but it seems to hesitate on the first record
that returns a filtered record after a record that returns no filtered
records.
So it seems to me that the txt field update is somehow being tied to the
success (or return of data) from the subform filter. I don't know why that
should be since I call them individually.
I even went so far as to build a separate cmdButton to do the 'Next Record'
nav and added the update script to its click event, but it performs the
same way. And, I should mention that the txt field update code is executed
(or should be) BEFORE the filter, so I would have thought the filter's
success would have nothing to do with it.
Any thoughts?
Kurt