Filtered Drop Down list from Access DB - InfoPath Dev
in

InfoPath Dev

Filtered Drop Down list from Access DB

Last post 07-16-2006 06:52 AM by pengbo. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-02-2006 04:29 PM

    Filtered Drop Down list from Access DB

    Hi,
    I want to create a Drop Down List that is filtered based on a previous Drop Down List.
    Both List are Bound to an Access Database. (They use different tables). They are in Access and not XML format becasue I have another form that employees enter information into to add customers.
    The 1st is Drop Down List "Company Name"
    The 2nd is Drop Down List "Server Name"
    I can accomplish this in an Access Form; what I would like is that when a company is selected in the 1st DDL the 2nd should only show servers that belong to that company.
    My Access DB is configured as follows
    I have a table named Companies that has 2 Fields.
    1.) Company ID (Primary Key)
    2.) Company Name
    Table 2 is Named Servers & has 3 fields
    1.) ServerID (Primary Key)
    2.) Server Name
    3.) CompanyID which does a lookup to the Companies Table.
    Thanks in advance,

    Bret
  • 06-02-2006 11:18 PM In reply to

    Re: Filtered Drop Down list from Access DB

    Hi Bret and welcome to the forum!

    What you're looking for is a cascading drop-down list. Check out these tutorials for what you're looking for:
    http://infopathdev.com/howto/tutorials/default.aspx?s=Lists
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-05-2006 01:22 PM In reply to

    Re: Filtered Drop Down list from Access DB

    Thanks for tyhe reply. The problem is that the cascading lists seem like you can only use an XML file? I need to use tables out of an access DB is this possible?
  • 07-16-2006 06:52 AM In reply to

    • pengbo
    • Not Ranked
    • Joined on 07-16-2006
    • Posts 4

    Re: Filtered Drop Down list from Access DB

    Follow this tutorial...

    http://infopathdev.com/howto/tutorials/default.aspx?i=9f6fda3a14c14ac4924cf0a382928432

    Where you add the data connection choose your access database instead. Choose the top level parent table as your source and add the child table using the add button while the parent table is highlighted. You can add a third table the same way.

    Then instead of choosing the top level table as Greg does in the tutorial choose the primary key id field (assuming you use ID's) as the value and the nice human readable field for display. Then just remember the value returned is the id number which you can match to the current()/my:field1 etc...

    Watchout for the names of the fields in the tables though if they are named the same. Just spent a day chasing my tail trying to figure the third cascading drop down because I had too many fields named the same thing. Soon as I made em unique I could follow it.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.