go to last record minus one?

T

TL

I am trying to do a search for the second last record in
this table. Is it possible to create a macro or a query
or code (whatever) to do a search in a form that will go
to the last record minus one? If so, how would I go about
it?

Thanks in advance for any help.
 
K

Ken Snell

How do you define the "second-to-last" record in a table? A table has no
inherent "order" except the order that you impose on it specifically through
a query (other than the indices that the table may use for displaying
records in datasheet view).

Base a query on the table and use a sort order. Bind that to a form as the
recordsource. Then you can do a MoveLast action and then a MovePrevious
action (in a macro) or use VBA code to do similar steps to get to the
"second-to-the-last" record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top