I have a form, where I want to implement cascading combo-box.
1st user selects "Client Name" where I have SQL statement getting 3 columns - CLient ID, Client First Name and Client Last Name. In order to allow users to enter First Name, instead of ID, have set the Column Width: 0;3
2nd then user selects "Work" where I have SQL statement getting 2 columns - Work ID, Work description. In order to allow users to enter Work description, instead of ID, have set the Column Width : 0;2
Want to cascade the list, so that "Work" list in combo-box only shows the Work table has a foreign key to Client ID.
I implemented the cascading combo-box by adding SQL Statement to Row Source
of work Combo-box.
SELECT WorkTbl.WorkID, WorkTbl.WorkDescription, WorkTbl.ClientID
FROM WorkTbl
WHERE (((WorkTbl.ClientID)=Forms![Work Done Entry]!cboClientID);
"cboClientID" is name of the Combo-box of Client.
But since the User will be entering in "Client Name" instead of "Client ID" because of have set the Column Width: 0;3
on cboClientID.
Hence the SQL Query is not working.
Is there any work around? One solution, which i found (But could not make it work) was to add a Text-box and set Client ID in this Text-Box and then make us of this Text box to get the client ID required in the SQL. Got this idea form This Question
Thanks in advance for answering this Question. Any help or suggestion appreciated.