Results 1 to 3 of 3
  1. #1
    SoulGame's Avatar
    SoulGame is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jan 2017
    Posts
    14

    Access 2016 Box combination, auto-list


    Hello people !


    I have two combobox that make the list function. I want to assign a number in a combobox and in the other combobox I want to see options X. How can I program the results according to the result of the first combobox?

    attached image:

    Click image for larger version. 

Name:	2017_03_02_12_38_02_Access_Consell_Ensenyament_Base_de_datos_C_Users_Usuari_OneDrive_CONSELL.png 
Views:	21 
Size:	3.4 KB 
ID:	27733

    The option in 1 combobox:

    Click image for larger version. 

Name:	2017-03-02 12_37_31-Access - Consell_Ensenyament _ Base de datos- C__Users_Usuari_OneDrive - CON.png 
Views:	19 
Size:	2.3 KB 
ID:	27734

    Thanks !

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Cbo2's query uses cbo1 as the where clause.
    select field2 from table where field1= forms!myForm!cbo1

    once the user picks item in cbo1, you must refresh the list in cbo2, in the AFTERUPDATE event.
    Code:
    sub cbo1_afterupdate()
      Cbo2.requery
    end sub

  3. #3
    SoulGame's Avatar
    SoulGame is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jan 2017
    Posts
    14
    Quote Originally Posted by ranman256 View Post
    Cbo2's query uses cbo1 as the where clause.
    select field2 from table where field1= forms!myForm!cbo1

    once the user picks item in cbo1, you must refresh the list in cbo2, in the AFTERUPDATE event.
    Code:
    sub cbo1_afterupdate()
      Cbo2.requery
    end sub
    Where do I put the consultation?
    And the cbo2 has numbers that are not in any table.
    FORMER:
    The option of cbo1 is '1', the options of cbo2 have to be {'1' - '2' - '3'}.
    With a query this is possible?

    Thanks for your help, and sorry for my lack of access.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-03-2017, 09:25 PM
  2. IIf, And, Or combination in Access Query
    By sparkes84 in forum Queries
    Replies: 4
    Last Post: 08-12-2016, 03:47 AM
  3. Replies: 2
    Last Post: 07-13-2016, 08:28 AM
  4. Replies: 3
    Last Post: 04-12-2016, 07:15 AM
  5. Replies: 1
    Last Post: 09-09-2009, 04:42 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