Dependent combo box in Web Database

Office10

New member
Local time
Today, 05:26
Joined
Mar 26, 2014
Messages
4
Hello,

See the Main form of attached file, I would like to see contacts list box is made from drop-down list Customers. dependent

In the main form needs to select one customer (for example: Klant1), only the contacts 'de Vries' and 'Van der Linden' can be selected in the combo box of contact (in the main form) ..
I do not succeed despite several attempts with macros to achieve this.

Anyone have an idea how to solve this. Preferably modify the file so that I see the solution.

Thanks in advance.
 

Attachments

Hi,

In order to make this work, you need to make the following changes:
1. The second combo box must use a saved query object as it data source and that query must reference the first (parent) combo box control in the Criteria line.
2. You must adjust the data sources and column widths of both combo boxes such that you are bringing in the ID values into the combo boxes. In this case you can hide the ID value by changing the column count to 2 and setting the column widths to 0;1 so that the ID value is hidden but can be referenced by the saved query.
3. You must create a macro in the AfterUpdate event of the first combo box such that it requeries the second combo box to display the appropriate related values.

See the attached revised file changes I made in order to understand how this all functions. It should be what you want now.

--------------------
Jeff Conrad - Access Junkie - MVP Alumnus
Senior SDET - Access Test Team - Microsoft Corporation

Author - Microsoft Access 2013 Inside Out
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------
 

Attachments

Thanks for your help, this is what I am looking for.
 

Users who are viewing this thread

Back
Top Bottom