MoveNext on Filtered Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2003...Windows XP

Wantng to establish a Filter by Form, I have built a query string called:
'strWhere'

This was applied using:
Me.Filter = strWhere
Me.FilterOn = True

It functions correctly.

My problem is that now, on the same form, when using the "Get Next Record"
command button as built and coded under the command button wizard, it is not
taking me to the next 'filtered record' but the next record in the complete
and unfiltered recordset, ignoring the filter. The code created for the
button by the wizard contains the line:
DoCmd.GoToRecord , ,acNext

Logically I don't follow why this would be, but need some code or a trick to
get to the next record in the filtered recordset. There does not appear to
be a criteria option available under the DoCmd.GoToRecord syntax.

Many Thanks for the great past, current and future help provided here.
 
Wantng to establish a Filter by Form, I have built a query string called:
'strWhere'

Actually, that's applying a filter to the form. "Filter-by-form" is a
separate feature intended for selecting multiple values in the fields with
logical operators through the user interface, which filters the form's
Recordset with these selections.
it is not
taking me to the next 'filtered record' but the next record in the complete
and unfiltered recordset, ignoring the filter.

I'm using Access 2003 SP-1 on Windows XP SP-2, and I'm not experiencing the
phenomenon you're describing. Perhaps you're using a subform on a form, and
the filter and the "go to next record" are not being applied to the same
Recordset, even though it appears to be all one form?

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
Thanks Gunny,

You help..you educate...kind of a full service sort of guy.
Suggestion worked fine.....Thanks
 
Back
Top