Navigation in a continuous form

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

I have a continuous form with a very large number of
records displayed. what i would like to do is create a
series of buttons from A - Z that navigate straight to the
records whose company name begins with that letter.

For example, if a user wants the 'Camel Company' the user
can click on the 'C' button and is directed straight to
the records with company names beginning with C.

The records are already in alphabetical order by company
name.

Is there any way to do this?

Thanks

Simon
 
Simon
Have a look in the Northwind sample database usually located C:\Program
Files\Microsoft Office\Office\Samples\ folder and at the Customer Phone List
form. This may contain what you are after.

Hope this helps
--
Regards

Ian Baker
Jackaroo Developments Pty Ltd
Download Jackaroo (an IT Help Desk application) at Web:
http://jackaroo.net.au
| I have a continuous form with a very large number of
| records displayed. what i would like to do is create a
| series of buttons from A - Z that navigate straight to the
| records whose company name begins with that letter.
|
| For example, if a user wants the 'Camel Company' the user
| can click on the 'C' button and is directed straight to
| the records with company names beginning with C.
|
| The records are already in alphabetical order by company
| name.
|
| Is there any way to do this?
|
| Thanks
|
| Simon
 
I have done this with buttons on a main form.

Private Sub cmdGotoA_Click()
GotoLetter "A"
End Sub

Public Sub GotoLetter(letter As String)
Dim rstSearch As DAO.Recordset
Set rstSearch = Me!Subform.Form.RecordsetClone
rstSearch.FindFirst "[Last Name] LIKE '" & letter & "*'"
If Not rstSearch.NoMatch Then Me!Subform.Form.Recordset.Bookmark = rstSearch.Bookmark
Set rstSearch = Nothing
End Sub

The GoToLetter sub is in the main form's module.
 
Ian,

Is there an explanation somewhere of how this was
implemented in the Northwind application?

David
 
Back
Top