syntax about record numbers on continous forms?

  • Thread starter Brainlord Mesomorph
  • Start date
B

Brainlord Mesomorph

what properties refer to record numbers (and more importantly visible
records) on continous forms? Now I'm not talking about ID numbers, these are
line numbers, or row numbers(?)

I mean, lets say I have a query of 1000 records. The user has opened it in a
continous forms form, and stretched it vertically so that it shows 10
records at a time. He's scrolled down halfway and is looking at records 855
through 865, and say a control on record 861 happens to have focus.

How do get the number 855 out of that? (the line number of the 1st visible
record)
or 865, or even 10? I can find the record on line 861 easily enough (with
its ID number) but I don't how to get 861 here either.

I'm trying to "take the bumps out" of a requery command here. I have buttons
that insert or delete records from the query and then requery the form. But
that takes them back to the top. I tryed to use docmd.findrecord to get them
back to the record they were on that still shifts the list up and the
(stupid) users get lost. I need to be able to take them back to the same
"10" records they were looking at.

Help!


aha tia
blm

(hmm, maybe I could add some kind of *temporary autonumber* in the query???
can I do that?)
 
S

Stephen Lebans

Already done for you. See the SelTop sample Form in this MDB:
http://www.lebans.com/setgetsb.htm
SetGetSB.zip is a database containing functions to allow a user to Set
or Get the current position of a ScrollBar Thumb for a Form.

NEW - Apr. 02/2000 The current ScrollBar position is equal to the
current Record Number being displayed at the Top of the Form.

Works in Form or Datasheet view.

Ver 1.7

Fix bug in SelTop method. Now works with first page of rows properly and
sets the Top row correctly when moving forward in the recordset one row
at a time.

Ver 1.6

Use SelTop to save Restore current row's position after a Requery.

Ver 1.5

Added support for Horizontal ScrollBars.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
B

Brainlord Mesomorph

Mr. Labans!
Your PictureBox mdb saved me years of programming once! (ok thats an
overstatement, but it was awfully handy!) Yes this is perfect. and your
website has all kinds of new goodies! It will take me a While to shop.
Thanks!
blm
 

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