I am sure this has been covered before but I can't get to the bottom of my problem:
I have a form showing some client details:
I have a table (clients) holding client names (client_name) and unique id (client_ID)
I have another table (pcalist) that hold a list of contacts for those clients. This stores each name with one of the client id's included in the client table. Each client can have many contacts.
I have a form that currently has a combo box to select the client_name field. If you select a client name then the relevant client_id entry from the clients table is populated in another field using
Me!call_clientID = Call_Client_Name.Column(1)
as an after update procedure (the rowsource for the client name is a query selecting the client name and id).
I would like the same process to provide a second combo box displaying all relevant contacts for that company.
I have tried amending the rowsource query in the client name combox box to include that and then add an addition line to the after update procedure but get and error stating 'type mismatch in expression'
I presume some sort of dlookup could be the key, but I can't get my head round it.
any ideas are greatefully received.
Pete
I have a form showing some client details:
I have a table (clients) holding client names (client_name) and unique id (client_ID)
I have another table (pcalist) that hold a list of contacts for those clients. This stores each name with one of the client id's included in the client table. Each client can have many contacts.
I have a form that currently has a combo box to select the client_name field. If you select a client name then the relevant client_id entry from the clients table is populated in another field using
Me!call_clientID = Call_Client_Name.Column(1)
as an after update procedure (the rowsource for the client name is a query selecting the client name and id).
I would like the same process to provide a second combo box displaying all relevant contacts for that company.
I have tried amending the rowsource query in the client name combox box to include that and then add an addition line to the after update procedure but get and error stating 'type mismatch in expression'
I presume some sort of dlookup could be the key, but I can't get my head round it.
any ideas are greatefully received.
Pete