GarryBrogden
New member
- Local time
- Today, 13:15
- Joined
- Jul 8, 2008
- Messages
- 7
Access 2003.
Apologies for the somewhat nebulous title of the question, but I'm a COBOL programmer trying to get to grips with Access & VB.
I have two tables: one is an application table, the other is a list of companies. The two are linked via a 'company code' (AppCoCode) so:
1234 = ABC Company, Some Street, Some Town
1235 = XYZ Company, Another Street, Another town...
I have created a form based on both tables to add applications onto which the user must input an AppCoCode, and then when they tab away from that box, the company details will be displayed (in unmodifiable text) from the Company table so they are sure they have the correct code.
However there are occasions when the user will not know what the AppCoCode is, and will have to search on the Company table by name (CoName). I have created an unbound combo box linked to the company name field on the company table to do this on the form.
What I therefore now need to do is 'reverse populate' the remaining fields: i.e. they pick the company name, and that autofills the AppCoCode field, and the remaining address fields. I've tried various beforeinsert and afterinsert combinations, but the CoName combobox remains 'detached' from the rest of the data: i.e input AppCoCode, the combobox remains blank; input data into the combobox, and the remaining boxes are blank, and can have any old rubbish put into them.
I don't particularly need the code, but rather a general outline of the process, if that makes sense.
In COBOL this has to be done by a query and pick, but it seems like I could cut that huge corner in Access.
Hope that makes sense. Thanks.
Apologies for the somewhat nebulous title of the question, but I'm a COBOL programmer trying to get to grips with Access & VB.
I have two tables: one is an application table, the other is a list of companies. The two are linked via a 'company code' (AppCoCode) so:
1234 = ABC Company, Some Street, Some Town
1235 = XYZ Company, Another Street, Another town...
I have created a form based on both tables to add applications onto which the user must input an AppCoCode, and then when they tab away from that box, the company details will be displayed (in unmodifiable text) from the Company table so they are sure they have the correct code.
However there are occasions when the user will not know what the AppCoCode is, and will have to search on the Company table by name (CoName). I have created an unbound combo box linked to the company name field on the company table to do this on the form.
What I therefore now need to do is 'reverse populate' the remaining fields: i.e. they pick the company name, and that autofills the AppCoCode field, and the remaining address fields. I've tried various beforeinsert and afterinsert combinations, but the CoName combobox remains 'detached' from the rest of the data: i.e input AppCoCode, the combobox remains blank; input data into the combobox, and the remaining boxes are blank, and can have any old rubbish put into them.
I don't particularly need the code, but rather a general outline of the process, if that makes sense.
In COBOL this has to be done by a query and pick, but it seems like I could cut that huge corner in Access.
Hope that makes sense. Thanks.