Results 1 to 7 of 7
  1. #1
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126

    Ctrl PgUp/PgDn doesn't work ?

    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 ?

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Form opened with acdialog behaves like a Modal form. Code execution stops until the form is closed.

  3. #3
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126
    ????? should that stop the Ctrl-PgDn/PgUp functionality in the opened form ?

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    If I were you, I would try it and see.

  5. #5
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126
    Ha, ha, yeah. ofcause ... but what IS IT you would want me to try ?

    I HAVE tried to
    1) set the Modal property on the opened form to YES and NO - no difference !
    2) set the acDialog to acWindowNormal in the opening CODE WITH Model set to both YES and NO in the opened form - result = the opened form just opens and closes again right away - just a short blink.

    I don't think there is more combinations I can do.

    and back to the problem - if I open the search form directly it all works fine with the Ctrl+PdDN/PdUp = the focus moves between records.

    If I open the search form with the code I posted - with the changes in different combinations - the Ctrl+PdDN/PdUp-functionality is NOT working !

    Obviously it has to do with the code I use to open the search form - but what other combinations can I use in the code ?

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    If search form is opened modal or acdialog, scrolling won't work. If opened normal, it closes immediately, right?
    I think you'll need a button to close the form opened normal.

  7. #7
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126
    Quote Originally Posted by davegri View Post
    If search form is opened modal or acdialog, scrolling won't work. If opened normal, it closes immediately, right?
    I think you'll need a button to close the form opened normal.
    I don't any reasen why it shouldn't - what has Ctrl+PdDN/PdUp to do with modalism ?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Macro doesn't work 100%
    By ITVader in forum Macros
    Replies: 28
    Last Post: 11-17-2016, 08:51 AM
  2. Replies: 5
    Last Post: 04-14-2014, 12:37 PM
  3. Just doesn't seem to work!
    By txmmoore in forum Reports
    Replies: 9
    Last Post: 01-16-2014, 11:39 AM
  4. Print reports in a tab ctrl in a tab ctrl
    By marcsessoms in forum Reports
    Replies: 1
    Last Post: 02-18-2012, 12:15 AM
  5. Query doesn't work the day after
    By sithis876 in forum Queries
    Replies: 1
    Last Post: 07-13-2010, 07:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums