I have made a generel search form - showing persons and as I enter characters in a search field the set of records shown is limited to records where my entered chareactors are present - works fine !
I the search result - let's say - shows 7 records, the focus is by default on the FIRST record in the set but often I need to "go down".
I can do that by using Ctrl+PgDn and Ctrl+PgUp if I want to move focus up again - works fine - BUT ....
When I open this search form on top of another form with this code:
Code:
Public Sub Opslag(f As String, keyName As String, fo As Form)
Dim frm As Form, gemId As Long, rst As Recordset
onlyHide = True
DoCmd.OpenForm f, acNormal, windowmode:=acDialog
If CurrentProject.AllForms(f).IsLoaded Then
Set frm = Forms(f)
gemId = frm.Controls.Item(keyName)
onlyHide = False
DoCmd.Close acForm, f
Set rst = fo.RecordsetClone
rst.FindFirst fo.Controls(keyName).Name & " = " & gemId
fo.Recordset.Bookmark = fo.RecordsetClone.Bookmark
End If
End Sub
this Ctrl+PgDn/PgUp DOESN'T work - WHY ?