Results 1 to 4 of 4
  1. #1
    ano is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    204

    vba scroll up with focus scrolling out view

    Code:
    rst.FindFirst "d_t = " & str
                   If rst.NoMatch Then
                       MsgBox "Record not found"
                   Else
                       rst.MovePrevious
                       Me.Bookmark = rst.Bookmark
                       Me.scroll fmScrollActionBegin object does not support this property or method
                       Parent.scroll fmScrollActionBegin 
                       me.parent.scroll fmScrollActionBegin 
                       forms!balans!lbl!scroll fmScrollActionBegin 
    forms!balans!lbl.scroll fmScrollActionBegin 
                       fmScrollActionBegin not defined --> add fm20.dll to preference : microsoft forms 2.0 object library
                   End If
               rst.Close
    i just cannot find solution for sync subform2 to subform1 without subform1 change view


    the attachment shows date selected but want date newest date
    union sql works faster then on dates
    2lines from table in form balans subform bl ; selected date is used in 5lines from sql
    d_d is vba nummering to select yesterday (d_d - 1 ) to calculate difference daily base
    d_t is vba nummering to select last month (d_t - 1 ) to calculate difference (running) month base
    Attached Thumbnails Attached Thumbnails Screenshot 2024-08-02 094033.png   Screenshot 2024-08-02 094114.png  
    Last edited by ano; 08-02-2024 at 06:55 PM. Reason: not defined needed preference

  2. #2
    ano is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    204
    work around sql not use dataview. copy d_d into textbox on mainform and focus on 1st row again and change sql to the textbox ;; solved !!! but not nice

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    The way to sync two subforms is to have a hidden control on the mainform that holds the value of one subform linked fields, and then link on that for the second subform.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    ano is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2023
    Posts
    204
    thanks to confirm my work around, but i had it working without help field, only wanted to adjust the scroll position that seems to be available

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

Similar Threads

  1. Mouse Scroll Not Scrolling?
    By d9pierce1 in forum Access
    Replies: 5
    Last Post: 03-07-2022, 08:29 AM
  2. Replies: 4
    Last Post: 04-14-2017, 05:03 PM
  3. Replies: 1
    Last Post: 03-03-2014, 04:08 PM
  4. Replies: 8
    Last Post: 03-01-2014, 02:15 PM
  5. Replies: 1
    Last Post: 12-10-2009, 09:58 PM

Tags for this Thread

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