Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32
  1. #16
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    If you are concerned that you are not explaining yourself well, then I recommend that you write your description/question in your native language, then use Google translate to get an English version and post that. This technique has worked well in previous threads.
    Good luck.

  2. #17
    Huron is offline Novice
    Windows 10 Access 2003
    Join Date
    Mar 2021
    Posts
    21
    Quote Originally Posted by orange View Post
    If you are concerned that you are not explaining yourself well, then I recommend that you write your description/question in your native language, then use Google translate to get an English version and post that. This technique has worked well in previous threads.
    Good luck.

    Sorry for your wasted time...

  3. #18
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    In this example, what I sent you is just the essence of what needs to be done. And excuse me, for what I may not be quite correct in explaining, but I try as hard as I can...
    Sorry for your wasted time...
    Seems Bob Fitz and I are on a different wavelength than you????

    If you can't explain, then no one can resolve it.
    Good luck.

  4. #19
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #20
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    And crossposted only 40 minutes ago
    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

  6. #21
    Huron is offline Novice
    Windows 10 Access 2003
    Join Date
    Mar 2021
    Posts
    21

    Red face Let's try again... :)

    O.K...Let’s try again...

    When I open the main form, then in both subforms I get such numbers - 28/28.
    Pic.-1

    When I select "Access" in the Combobox, in both subforms I get such numbers - 7/7.
    Pic.-2

    But when after that I choose the value of "All books" in the Combobox again, I get such numbers – 28 In the first subform and 7 In the second subform. And the second subform still shows only the values "Access".
    Pic.-3

    Although it must show all records, that is, it must show everything the same as the first subform. And values in both subforms must be the same - 28/28
    Pic.-1

    I don't understand where the problem is. And that's all I want to know....
    Attached Thumbnails Attached Thumbnails Picture-1.jpg   Picture-2.jpg   Picture-3.jpg  

  7. #22
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Or, let's not - until we know you read the article on cross posting and whether or not you care about it.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #23
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by Micron View Post
    Or, let's not - until we know you read the article on cross posting and whether or not you care about it.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  9. #24
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    As did I?

    However that appears to be as they use the same record source and are subforms are clones of each other?
    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

  10. #25
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    See attached file.

    Steps:
    1 open form
    2 select all books
    3 select Access
    4 Select all books
    ??
    Attached Files Attached Files

  11. #26
    Huron is offline Novice
    Windows 10 Access 2003
    Join Date
    Mar 2021
    Posts
    21
    1. When the Combobox value is „All books“, then the filter for both subforms is turned OFF.

    2.When the Combobox value is "Access," then the filter for both subforms is turned ON.

    3. But when you select "All books" again on Combobox, then the filter is turned OFF only on the first subform. Although must turned OFF on both subforms at once.

    4. Then on the second subform the filter has to be turned OFF manually. As shown in the picture.

    THIS IS THE ESSENCE OF THIS PROBLEM...:\

  12. #27
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  13. #28
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    See if you can spot any difference?
    Code:
    Private Sub BookType_AfterUpdate()
    Dim strCriteria As String
        
        If Not Me.BookType = -1 Then strCriteria = "[Type Id]=" & str(Me.BookType)
        With Me.[ML-Sub].Form
            .Filter = strCriteria
            .FilterOn = (Len(strCriteria) > 0)
        End With
        
        If Not Me.BookType = -1 Then strCriteria = "[Type Id]=" & str(Me.BookType)
        With Me.[ML-Sub1].Form
            .Filter = strCriteria
            .FilterOn = (Len(strCriteria) > 0)
            .Requery
        End With
        
    End Sub
    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

  14. #29
    Huron is offline Novice
    Windows 10 Access 2003
    Join Date
    Mar 2021
    Posts
    21
    Private Sub BookType_AfterUpdate()
    Dim strCriteria As String

    If Not Me.BookType = -1 Then strCriteria = "[Type Id]=" & str(Me.BookType)
    With Me.[ML-Sub].Form
    .Filter = strCriteria
    .FilterOn = (Len(strCriteria) > 0)
    End With

    If Not Me.BookType = -1 Then strCriteria = "[Type Id]=" & str(Me.BookType)
    With Me.[ML-Sub1].Form
    .Filter = strCriteria
    .FilterOn = (Len(strCriteria) > 0)
    .Requery
    End With

    End Sub

  15. #30
    Huron is offline Novice
    Windows 10 Access 2003
    Join Date
    Mar 2021
    Posts
    21

    CD

    Quote Originally Posted by Welshgasman View Post
    See if you can spot any difference?
    Code:
    Private Sub BookType_AfterUpdate()
    Dim strCriteria As String
        
        If Not Me.BookType = -1 Then strCriteria = "[Type Id]=" & str(Me.BookType)
        With Me.[ML-Sub].Form
            .Filter = strCriteria
            .FilterOn = (Len(strCriteria) > 0)
        End With
        
        If Not Me.BookType = -1 Then strCriteria = "[Type Id]=" & str(Me.BookType)
        With Me.[ML-Sub1].Form
            .Filter = strCriteria
            .FilterOn = (Len(strCriteria) > 0)
            .Requery
        End With
        
    End Sub

    Do you mean line „.Requery“...? I tried with and without this line. The same.
    When I disable the first subform, the second subform starts working normally.(Pic.-1)
    But when I turn on the first subform form again, the second one stops working.
    Attached Thumbnails Attached Thumbnails COD-1.jpg  

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box won't select from list
    By Heathey94 in forum Access
    Replies: 11
    Last Post: 09-14-2016, 04:57 PM
  2. Combo to select all, need a little help
    By vicsaccess in forum Access
    Replies: 7
    Last Post: 06-20-2016, 12:47 PM
  3. how to add select all option in combo box
    By Vaibhav2015 in forum Forms
    Replies: 6
    Last Post: 09-30-2015, 10:09 AM
  4. Replies: 3
    Last Post: 06-09-2013, 05:35 PM
  5. Combo box select from two fields
    By cnestg8r in forum Access
    Replies: 0
    Last Post: 10-31-2008, 10:05 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