Hi All,
Still very new to MS Access but learning fast!!
I have two tables. The following is a simplified example structure for each.
Table_A
Field_1; AutoNumber index
Field_2; String of codes e.g. MAR;2CH;HOM;;;;;;;
Field_3; String to hold expanded code descriptions.
Table_B
Field_1; Code - Will match the individual codes in Table_A.Field_2
Field_2; Description of code.
So what I want to do is:
visit every record in Table_A
Read the string of codes and seperate them out
Read the description for each code and build a string of the descriptions concatenated together.
Save that string back in to Field_3 of Table_A
So in the example above the following descriptions might be what those codes mean:
MAR - Married
2CH - 2 Children
HOM - Homeowner
So I build that in to a string:
"Married. 2 Children. Homeowner"
Then save that complete string back in to Field_3 in Table_A
I can express this OK in Pseudo Code but trying to get the correct VBA syntax for using the split function, then joining the tables and updating Table_A in the middle of a loop is defeating me. Any help would be much appreciated.
Cheers
David
Still very new to MS Access but learning fast!!
I have two tables. The following is a simplified example structure for each.
Table_A
Field_1; AutoNumber index
Field_2; String of codes e.g. MAR;2CH;HOM;;;;;;;
Field_3; String to hold expanded code descriptions.
Table_B
Field_1; Code - Will match the individual codes in Table_A.Field_2
Field_2; Description of code.
So what I want to do is:
visit every record in Table_A
Read the string of codes and seperate them out
Read the description for each code and build a string of the descriptions concatenated together.
Save that string back in to Field_3 of Table_A
So in the example above the following descriptions might be what those codes mean:
MAR - Married
2CH - 2 Children
HOM - Homeowner
So I build that in to a string:
"Married. 2 Children. Homeowner"
Then save that complete string back in to Field_3 in Table_A
I can express this OK in Pseudo Code but trying to get the correct VBA syntax for using the split function, then joining the tables and updating Table_A in the middle of a loop is defeating me. Any help would be much appreciated.
Cheers
David