dbTalk Databases Forums  

Continious Form Display

comp.databases.ms-access comp.databases.ms-access


Discuss Continious Form Display in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Clint Stowers
 
Posts: n/a

Default Continious Form Display - 11-26-2007 , 09:07 AM






Access 2003

I have a Continuous Form. On Open I force it to go to the Last
Record.

When the form opens only the last record is shown at the top. To view
any of the previous records you must scroll. This give the appearance
at first glance that no other records exist.

Is there a simple method to populate the form with records and leaving
the cursor at the bottom allowing data to be shown above.

Thanks in advance.

Reply With Quote
  #2  
Old   
Fred Zuckerman
 
Posts: n/a

Default Re: Continious Form Display - 11-26-2007 , 09:16 AM






"Clint Stowers" <AbacusSupport (AT) gmail (DOT) com> wrote

Quote:
Access 2003

I have a Continuous Form. On Open I force it to go to the Last
Record.

When the form opens only the last record is shown at the top. To view
any of the previous records you must scroll. This give the appearance
at first glance that no other records exist.

Is there a simple method to populate the form with records and leaving
the cursor at the bottom allowing data to be shown above.

Thanks in advance.
Right after your code that moves to the last record, try moving up 5
records:

DoCmd.MovePrevious
DoCmd.MovePrevious
DoCmd.MovePrevious
DoCmd.MovePrevious
DoCmd.MovePrevious

Fred Zuckerman




Reply With Quote
  #3  
Old   
lyle
 
Posts: n/a

Default Re: Continious Form Display - 11-26-2007 , 09:51 AM



On Nov 26, 10:07 am, Clint Stowers <AbacusSupp... (AT) gmail (DOT) com> wrote:
Quote:
Access 2003

I have a Continuous Form. On Open I force it to go to the Last
Record.

When the form opens only the last record is shown at the top. To view
any of the previous records you must scroll. This give the appearance
at first glance that no other records exist.

Is there a simple method to populate the form with records and leaving
the cursor at the bottom allowing data to be shown above.

Thanks in advance.
This works in Access 2002 with the Product List Form in the Northwind
Database.

Private Sub Form_Load()
' requires a reference to ADODB
Dim r As ADODB.Recordset
Set r = New ADODB.Recordset
Dim z As Long
With r
.ActiveConnection = CurrentProject.Connection
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.Open "SELECT * FROM Products"
.MoveLast
On Error Resume Next
For z = 0 To (Me.InsideHeight \ Me.Detail.Height) - 2
.MovePrevious
Next z
On Error GoTo 0
End With
Set Me.Recordset = r
DoCmd.RunCommand acCmdRecordsGoToLast
End Sub

This is not tested code, nor is it recommended for non-coders. But
it's fun.


Reply With Quote
  #4  
Old   
Stephen Lebans
 
Posts: n/a

Default Re: Continious Form Display - 11-26-2007 , 04:48 PM



You can achieve complete control via the Form's SelTop property. See:
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.


"Clint Stowers" <AbacusSupport (AT) gmail (DOT) com> wrote

Quote:
Access 2003

I have a Continuous Form. On Open I force it to go to the Last
Record.

When the form opens only the last record is shown at the top. To view
any of the previous records you must scroll. This give the appearance
at first glance that no other records exist.

Is there a simple method to populate the form with records and leaving
the cursor at the bottom allowing data to be shown above.

Thanks in advance.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.