From: Richard on
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
From: Stefan Hoffmann on
hi Richard,

On 02.03.2010 04:58, Richard wrote:
> 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 <--
From: Richard on
Dear Stefan

Many thanks for your help.

Richard

"Stefan Hoffmann" wrote:

> hi Richard,
>
> On 02.03.2010 04:58, Richard wrote:
> > 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 <--
> .
>
From: De Jager on

"Richard" <Richard(a)discussions.microsoft.com> wrote in message
news:88C24F9B-FCF7-4F5B-8D23-BAB4495E2591(a)microsoft.com...
> 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

From: joelgeraldine on
llmo*ùp
*


"Richard" <Richard(a)discussions.microsoft.com> a écrit dans le message de
groupe de discussion : 88C24F9B-FCF7-4F5B-8D23-BAB4495E2591(a)microsoft.com...
> 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