By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Continuous form behavior

P: n/a
In a continuous form I would like to force a specific record to the top of
the screen. I can use DoCmd.GotoRecord to go to the record that I want, but
how can I adjust the display so that record appears at the top of the
screen?
Nov 12 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Well, if you still have Access 97, you can do it with DoCmd.GoToPage with a
blank page number argument. In Access 200 and above, the page number
argument is no longer optional, so you can't do that even though the help
stillsays to leave out the page number argument to use the current page.

On Sun, 28 Sep 2003 06:09:52 GMT, "Randy Harris" <ra***@SpamFree.com>
wrote:
In a continuous form I would like to force a specific record to the top of
the screen. I can use DoCmd.GotoRecord to go to the record that I want, but
how can I adjust the display so that record appears at the top of the
screen?


Nov 12 '05 #2

P: n/a
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:u5********************************@4ax.com...
Well, if you still have Access 97, you can do it with DoCmd.GoToPage with a blank page number argument. In Access 200 and above, the page number
argument is no longer optional, so you can't do that even though the help
stillsays to leave out the page number argument to use the current page.

On Sun, 28 Sep 2003 06:09:52 GMT, "Randy Harris" <ra***@SpamFree.com>
wrote:
In a continuous form I would like to force a specific record to the top ofthe screen. I can use DoCmd.GotoRecord to go to the record that I want, buthow can I adjust the display so that record appears at the top of the
screen?


I should have said that I am using Access 2000.
Nov 12 '05 #3

P: n/a
On Sun, 28 Sep 2003 06:42:57 GMT, "Randy Harris" <ra***@SpamFree.com>
wrote:
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:u5********************************@4ax.com.. .
Well, if you still have Access 97, you can do it with DoCmd.GoToPage with

a
blank page number argument. In Access 200 and above, the page number
argument is no longer optional, so you can't do that even though the help
stillsays to leave out the page number argument to use the current page.

On Sun, 28 Sep 2003 06:09:52 GMT, "Randy Harris" <ra***@SpamFree.com>
wrote:
>In a continuous form I would like to force a specific record to the topof >the screen. I can use DoCmd.GotoRecord to go to the record that I want,but >how can I adjust the display so that record appears at the top of the
>screen?
>


I should have said that I am using Access 2000.


Then I really wish I knew - for me as well as you. I sent a bug report to
Microsoft, but they have not added anything to the knowledge base about it
(big surprise).
Nov 12 '05 #4

P: n/a
Steve,

I've come up with an extremely clumsy work around. I'm embarrassed to show
the code, it's so bad, but if no one provides a better solution, you might
find it of use.

Const ScreenRowsShown As Integer = 10
Dim CurrentRow as Long

[Code Here...]

CurrentRow = Me.CurrentRecord
If CurrentRow < ScreenRowsShown Then
DoCmd.GoToRecord , , acLast
Else
DoCmd.GoToRecord , , acFirst
End If
DoCmd.GoToRecord , , acGoTo, CurrentRow

Like I said, kludgey, but it gets the current record to the top of the
screen.
Randy
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ad********************************@4ax.com...
On Sun, 28 Sep 2003 06:42:57 GMT, "Randy Harris" <ra***@SpamFree.com>
wrote:
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:u5********************************@4ax.com.. .
Well, if you still have Access 97, you can do it with DoCmd.GoToPage with
a
blank page number argument. In Access 200 and above, the page number
argument is no longer optional, so you can't do that even though the
help stillsays to leave out the page number argument to use the current page.
On Sun, 28 Sep 2003 06:09:52 GMT, "Randy Harris" <ra***@SpamFree.com>
wrote:

>In a continuous form I would like to force a specific record to the

topof
>the screen. I can use DoCmd.GotoRecord to go to the record that I
want,but
>how can I adjust the display so that record appears at the top of the
>screen?
>


I should have said that I am using Access 2000.


Then I really wish I knew - for me as well as you. I sent a bug report to
Microsoft, but they have not added anything to the knowledge base about it
(big surprise).

Nov 12 '05 #5

P: n/a
Randy Harris wrote:
In a continuous form I would like to force a specific record to the top of
the screen. I can use DoCmd.GotoRecord to go to the record that I want, but
how can I adjust the display so that record appears at the top of the
screen?


When all else fails, go to Stephen Lebans' site ;-)
I think his SetGetSB db has a way to do what you want.
www.lebans.com

--
Marsh
Nov 12 '05 #6

P: n/a
Hey Marshall,
the sample form using the SelTop property is the best solution:
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.
"Marshall Barton" <ma*********@wowway.com> wrote in message
news:3p********************************@4ax.com...
Randy Harris wrote:
In a continuous form I would like to force a specific record to the top ofthe screen. I can use DoCmd.GotoRecord to go to the record that I want, buthow can I adjust the display so that record appears at the top of the
screen?


When all else fails, go to Stephen Lebans' site ;-)
I think his SetGetSB db has a way to do what you want.
www.lebans.com

--
Marsh


Nov 12 '05 #7

P: n/a
ra***@SpamFree.com (Randy Harris) wrote in
<QW********************@newssvr28.news.prodigy.com >:
In a continuous form I would like to force a specific record to
the top of the screen. I can use DoCmd.GotoRecord to go to the
record that I want, but how can I adjust the display so that
record appears at the top of the screen?


Why do you care?

It sounds like a flip question, but why does something like this
make such a difference that you want to spend all the time
implementing something to do this?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #8

P: n/a
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90.. .
ra***@SpamFree.com (Randy Harris) wrote in
<QW********************@newssvr28.news.prodigy.com >:
In a continuous form I would like to force a specific record to
the top of the screen. I can use DoCmd.GotoRecord to go to the
record that I want, but how can I adjust the display so that
record appears at the top of the screen?
Why do you care?

It sounds like a flip question, but why does something like this
make such a difference that you want to spend all the time
implementing something to do this?


Usability. I'm making it easier for the user to locate the desired
information.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #9

P: n/a
You can use the Form's SelTop property with a couple of lines of code to
achieve the desired results. I wrote the solution to solve the issue of
allowing the user to easily find the record they were working on, in the
exact same position within the section, after a requery or to duplicate
row positioning in the current session to match that at the end of the
last/previous session.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90.. .
ra***@SpamFree.com (Randy Harris) wrote in
<QW********************@newssvr28.news.prodigy.com >:
In a continuous form I would like to force a specific record to
the top of the screen. I can use DoCmd.GotoRecord to go to the
record that I want, but how can I adjust the display so that
record appears at the top of the screen?


Why do you care?

It sounds like a flip question, but why does something like this
make such a difference that you want to spend all the time
implementing something to do this?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc


Nov 12 '05 #10

P: n/a
Regrettably, SelTop doesn't seem to put the current record at the top of the
screen unless scrolling occurs. If the record is off the screen, it will.
The behavior seems exactly the same as DoCmd.GotoRecord.
"Stephen Lebans" <St***********@mvps.org> wrote in message
news:Es********************@ursa-nb00s0.nbnet.nb.ca...
You can use the Form's SelTop property with a couple of lines of code to
achieve the desired results. I wrote the solution to solve the issue of
allowing the user to easily find the record they were working on, in the
exact same position within the section, after a requery or to duplicate
row positioning in the current session to match that at the end of the
last/previous session.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90.. .
ra***@SpamFree.com (Randy Harris) wrote in
<QW********************@newssvr28.news.prodigy.com >:
In a continuous form I would like to force a specific record to
the top of the screen. I can use DoCmd.GotoRecord to go to the
record that I want, but how can I adjust the display so that
record appears at the top of the screen?


Why do you care?

It sounds like a flip question, but why does something like this
make such a difference that you want to spend all the time
implementing something to do this?

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc

Nov 12 '05 #11

P: n/a
ra***@SpamFree.com (Randy Harris) wrote in
<Pl********************@newssvr28.news.prodigy.com >:
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:94***************************@24.168.128.90. ..
ra***@SpamFree.com (Randy Harris) wrote in
<QW********************@newssvr28.news.prodigy.com >:
>In a continuous form I would like to force a specific record to
>the top of the screen. I can use DoCmd.GotoRecord to go to the
>record that I want, but how can I adjust the display so that
>record appears at the top of the screen?


Why do you care?

It sounds like a flip question, but why does something like this
make such a difference that you want to spend all the time
implementing something to do this?


Usability. I'm making it easier for the user to locate the
desired information.


Maybe, then, a continuous form is the wrong user interface for it.

Another alternative would a navigation listbox or subform and a
detail form that displays the details of the record selected in the
listbox or navigation subform.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.