• Lookup field to a query, dependant on field value (Access 97/SR2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Lookup field to a query, dependant on field value (Access 97/SR2)

    Author
    Topic
    #1770155

    I hope someone can help – I’m sure this is easy but I can’t seem to do it!

    I have a query that lists client code and department – eg:

    Client Code: ABC
    Department: Personnel
    Client Code: ABC
    Department: Accounts
    Client Code: XYZ
    Department: IT
    Client Code: XYZ
    Department: Marketing

    On the form, the user selects a work type from a combo field – the second column contains the client code which is then stored in a text field.

    The next combo field shows the departments and client code – how can I force the field to only show the departments for the selected client code? (eg. if client code is XYZ, the combo field should only show IT & Marketing)

    I am quite new to Access so the simpler the answer, the better!

    Many thanks,

    Viewing 0 reply threads
    Author
    Replies
    • #1786164

      you can write a query for the second combo box using the client code in the first combo as the criteria
      them use this query as the record source for the second combo box
      you can requery the second combo by placing code on the on click of the first combo
      something like combo2.requery

      • #1786166

        Thanks Jerry – that works a treat.

        Regards,

    Viewing 0 reply threads
    Reply To: Lookup field to a query, dependant on field value (Access 97/SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: