If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Click to scroll
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 |
#2
|
|||
|
|||
Click to scroll
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 -- |
#3
|
|||
|
|||
Click to scroll
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 -- . |
#4
|
|||
|
|||
Click to scroll
"Richard" wrote in message ... 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 |
#5
|
|||
|
|||
Click to scroll
llmo*ùp
* "Richard" a écrit dans le message de groupe de discussion : ... 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 |
Thread Tools | |
Display Modes | |
|
|