Results 1 to 8 of 8
  1. #1
    Jay2077 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2017
    Posts
    6

    How to create a form that populates from a drop down selection

    Hi,

    I am a relative newbie.



    How to create a form that populates from a drop down selection ? I already have the drop down working I want that to populate a form. How can I do this ?

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    In the AfterUpdate event of the combobox on the form(change those names below to your names):

    Me.Filter = "FieldInTable = """ & Me.ComboBoxName & """"
    Me.FilterOn = True

  3. #3
    Jay2077 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2017
    Posts
    6
    Quote Originally Posted by Bulzie View Post
    In the AfterUpdate event of the combobox on the form(change those names below to your names):

    Me.Filter = "FieldInTable = """ & Me.ComboBoxName & """"
    Me.FilterOn = True


    Sorry I'm a little confused what do you mean by Me.filter ? Do I create a new form etc first?

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Thought you already have a form with a dropdown or combobox field on it?

  5. #5
    Jay2077 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2017
    Posts
    6
    No I have the drop down already set up, what is the best way to go from here for data to appear below ? How do I it so the data changes to the drop down option ?

  6. #6
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    "I have the drop down already set up" what does that mean, you have a query that returns the values you want in a list? Or you have a table with the values?

    So you create a form based on a table or query, then on the form add all the fields from the table or query, then at the top create a combobox object and use wizard to get your list.

  7. #7
    Jay2077 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2017
    Posts
    6
    Quote Originally Posted by Bulzie View Post
    "I have the drop down already set up" what does that mean, you have a query that returns the values you want in a list? Or you have a table with the values?

    So you create a form based on a table or query, then on the form add all the fields from the table or query, then at the top create a combobox object and use wizard to get your list.
    I have 3 relationship drop downs set up

    a connect to b and b to c (eg)

    choose from a, then b and c

    I then want to c to trigger off the details for a sub form etc rather than using the wizard I want to take the values from drop down C

  8. #8
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    You are confusing us with the word "drop down". If you have a field on a table with a down arrow symbol, that is a table lookup. If the field is on a form then it is a combobox. Table lookups are not recommended at all, they cause confusion and strange behavior.

    To create a form:
    - go to Create>Form Wizard and create a form based on the table or query you wish to use
    - add a new field - Design>Combobox
    - set its Row Source property to show the fields you want to filter the form with
    - in its AfterUpdate event in VBA:
    Me.Filter="FieldFromTableName=" & Me!comboboxname
    Me.FilterOn=True
    Me.Requery

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

Similar Threads

  1. Combobox selection populates Listbox
    By Thompyt in forum Programming
    Replies: 9
    Last Post: 09-24-2015, 01:55 PM
  2. Replies: 1
    Last Post: 05-27-2013, 09:46 PM
  3. Replies: 2
    Last Post: 04-10-2013, 02:59 PM
  4. Replies: 1
    Last Post: 09-10-2012, 11:21 PM
  5. Replies: 3
    Last Post: 07-31-2010, 07:41 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