I am using Access 2000 as the front end and MS SQL 2000 as the backend.
I have a one record form that I set using something like:
strSQL = "SELECT * FROM dbo_WBACCT WHERE
(((dbo_WBACCT.ACCOUNT)='"423456"'));"
Me.RecordSource = strSQL
Obviously I only want one record at a time because the database is very
big.
Some of the data looks like this:
ACCOUNT Name
2344566 Smith
2344578 Jones
2344582 Davis
The data is sorted on account number. If I am looking at account #
2344578, I want to click a button to view the next account number which
in the example is 2344582.
The code for the button must find that the next account # is 2344582 so
it can change the recordsource for the form again.
How can I efficiently find this next account number. Using ADO's
rst.Find is too slow to trudge through the whole recordset to find
account # 2344578 and then doing a movenext. It takes a could of
minutes.
Seems simple, but I am only spinning my wheels. You might ask why one
would want to look at the next account number. The answer is because
this is for a utility that wants to see the next person on the street.
The next account # is the neighbor of the previous account #. What do
the experts say?