detemine page of continuous form

S

Stephen

I have looked at Microsoft Knowledge Base Article - 210336 but this does
quite apply.

I have an .ADP that is being used by users on a touch-screen format. Hence,
all of the controls and functions need to be "touch-screen" friendly in a
fast-paced environment (restaurant)

The continuous form I am using has the items that have been listed for an
order.
AS you can imaging, the order may have a lot of item, so the continuous form
would normally be well served with a vertical scroll bar. However, because
this is a touch screen, the scroll bars are somewhat difficult to use. I
want to have a "pagedown" and "pageup" control that when the user touches
the control it will advance the continuous form to the next age of items.

Example: The subform size allows visibility of 15 items. When the form
opens, it will show items 1-15. If the user touches the page down it will
advance to items 15-29 (moves the last item to the top).

I tried using:
docmd.GoToRecord ,,acNext,15 (the offset will change based on a variable).

However, it doesn't move a full screen. It will put the target record to the
bottom.

Is there a way to do this simply, or do I ned to have module variables that
keep track of which record and then use a formula to determine which record
to move tot he bottom/top of the screen?

-Setphen
 
N

Neil

Hello Stephen,

I think the SelTop property of the subform is what you need to use here. To
goto the next 15 pages for example, in the on click of you page down button
you would use:

Me.SelTop = Me.SelTop + 15

Using your variable:

Me.SelTop = Me.SelTop + MyVariableName

The SelTop property will move the required record to the top of the subform
(dont know if it automatically handles errors or if u have to code them -
e.g. what happens when you code the subform to move to record 59 when there
are only 42 in the subform). If u said Me.SelTop = 25 then the 25th record
will be at the top of the subform.

HTH,

Neil.
 
N

Neil

Sorry,

Terminology is a bit confusing here:
goto the next 15 pages for example, in the on click of you page down
button

should really be 'goto the next 15 records'

Neil.
 
S

Stephen Lebans

See the SelTop sample Form in the MDB here:
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.
 

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