Results 1 to 5 of 5
  1. #1
    Batch is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2017
    Posts
    1

    Question Populate form from drop down field.

    I have created a table with, among other things, peoples names, phone number and location. This table was populated with a form containing those fields. I have also inserted a dropdown field in the header that is linked to the names in the table. What I want to be able to do is click this field, have the names drop down, select a name and then have all the fields in the form populate with that individuals information.

    I don't think it's too hard to do, but I'm fairly new to Access 2013 and I haven't been able to find the solution online.

    Any help would be greatly appreciated.

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Combobox should have

    select personID, firstname,surname
    From tblpeople
    Order by surname.

    In the on change event of the combobox type

    Me.filter = "personID = " & cboname.value
    Me.requery

    That should do it.

    Cboname your drop down box
    PersonID the primary key in the table

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I think the Me.FilterOn property needs to be set also:
    Code:
    Me.filter = "personID = " & cboname.value
    Me.FilterOn = True
    Me.requery

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Thanks Steve. Basic error!!

  5. #5
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    TIP: The combo box wizard has a Find Record option. It is the third (bottom) option. It will create what you want.

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

Similar Threads

  1. Drop down box to auto populate fields
    By sarah.s in forum Forms
    Replies: 6
    Last Post: 01-28-2017, 09:02 AM
  2. Replies: 2
    Last Post: 04-20-2016, 11:47 AM
  3. Replies: 2
    Last Post: 04-15-2014, 05:47 AM
  4. Replies: 12
    Last Post: 11-18-2012, 03:53 PM
  5. Replies: 10
    Last Post: 10-10-2011, 08:08 PM

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