Click to scroll

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi

I have a listbox populated with contact names. When I click 'd', it goes to
the names that starts with 'd'.

How do I duplicate it in a continuous subform with a textbox?

Many thanks in advance
Richard
 
hi Richard,

I have a listbox populated with contact names. When I click 'd', it goes to
the names that starts with 'd'.
How do you 'click' a 'd'?
How do I duplicate it in a continuous subform with a textbox?
Enable the forms key preview property on the Event tab. Add an event
procedure for the Key Pressed event, e.g.:

Private Sub Form_KeyPressed(KeyCode As Integer)

Dim rs As DAO.Recordset

Set rs = Me.RecordsetClone
rs.FindFirst _
"[fieldNameBoundToYourTextBox] LIKE '" & Chr(KeyCode) & "*'"
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing

End Sub


mfG
--> stefan <--
 
Dear Stefan

Many thanks for your help.

Richard

Stefan Hoffmann said:
hi Richard,

I have a listbox populated with contact names. When I click 'd', it goes to
the names that starts with 'd'.
How do you 'click' a 'd'?
How do I duplicate it in a continuous subform with a textbox?
Enable the forms key preview property on the Event tab. Add an event
procedure for the Key Pressed event, e.g.:

Private Sub Form_KeyPressed(KeyCode As Integer)

Dim rs As DAO.Recordset

Set rs = Me.RecordsetClone
rs.FindFirst _
"[fieldNameBoundToYourTextBox] LIKE '" & Chr(KeyCode) & "*'"
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing

End Sub


mfG
--> stefan <--
.
 
Richard said:
Hi

I have a listbox populated with contact names. When I click 'd', it goes
to
the names that starts with 'd'.

How do I duplicate it in a continuous subform with a textbox?

Many thanks in advance
Richard
 
Back
Top