Navigation in a continuous form

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
 
I

Ian Baker

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
 
W

Wayne Morgan

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.
 
D

David

Ian,

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

David
 

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