Results 1 to 10 of 10
  1. #1
    tihmir is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2018
    Posts
    18

    Create a filter form maching with second form

    Hi, all. I need some help, please,
    I’m working with two forms
    Form_1 – “Filter”
    Form_2 – “Objects”

    In the Form_1 – “Filter” I have 3 comboboxes:
    1-Municipalities
    2-Cities
    3-Тypes of objects
    So, I want to open second form (Form_2 – “Objects”) with command button.
    So, I want to choose in 1st combobox Municipalities, then in 2nd combobox to choose Cities and then in 3rd to choose Тypes of objects.
    When I choose Тypes of objects on pressing command button I want to open Form_2 – “Objects” which includes field „Тypes of objects“ but only Тypes of objects in the selected sity in the 2nd combobox.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can add a second field to this with AND between them:

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tihmir is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2018
    Posts
    18
    When I choose an City in the combobox "Cities", then choose an object type in the combobox "TypeOfObject" on pressing comand button I want to load Form2 but load only these type of objects in selected sity (combobox "Cities").
    This is my base......
    Database4.zip

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I won't be at a computer for a bit. Did you try to adapt that link?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    tihmir is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2018
    Posts
    18
    Quote Originally Posted by pbaldy View Post
    I won't be at a computer for a bit. Did you try to adapt that link?
    Тhanks for the tips. I tried but still does not get. The probles is that I want to create two criterias:
    1st - In the second form (Form_2) I want to load only Тypes of objects selected in 3rd combobox "TypeOfObject" on Form_1 and....
    2nd - These TypeOfObjects must be only in the Cities selected in 2st combobox "Cities" on Form_1
    Please, someone help me!!!

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What exactly did you try that didn't work? This is air code:

    DoCmd.OpenForm "form2", , , "CtiyID = " & Me.cbo_Cities & " AND ObjectID = " & Me.cbo_TypeOfObjects
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    tihmir is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2018
    Posts
    18
    pbaldy Did you see my possted database?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Yes, it had no attempt to do this in it, unless I'm blind.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    tihmir is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2018
    Posts
    18
    Quote Originally Posted by pbaldy View Post
    Yes, it had no attempt to do this in it, unless I'm blind.
    can you do it (VBA code) to my database and sand me back, please?

  10. #10
    tihmir is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    May 2018
    Posts
    18
    I have cross posted my post because I can not do it.
    https://www.access-programmers.co.uk/forums/showthread.php?p=1600161#post1600161


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

Similar Threads

  1. Replies: 2
    Last Post: 06-01-2015, 01:21 PM
  2. Replies: 9
    Last Post: 02-24-2015, 11:19 AM
  3. Replies: 3
    Last Post: 11-27-2012, 07:20 AM
  4. Replies: 28
    Last Post: 03-08-2012, 06:47 PM
  5. Replies: 4
    Last Post: 08-05-2011, 07:27 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