Job014: Write Access VBA function/procedure to loop through the matched records in tlkpLyPr and tlkpPrLy to populate a junction table, tlkpLyDtl
Joining the two tables requires parsing a variable length string in the first table, [login to view URL], into 2 letter values that match a two letter code in the second table, tlkpPrLy.
The variable length string is always a sequence of two character codes. The procedure/function should accommodate string lengths in the first table from 2 characters to 244 characters.
The SQL samples below demonstrates the first 3 joins of the 122 possible:
SELECT [login to view URL], [login to view URL]
FROM tlkpPrLy, tlkpLyPr
WHERE (((Mid([strLy],1,2))=[tlkpPrLy].[strAaK]));
SELECT [login to view URL], [login to view URL]
FROM tlkpPrLy, tlkpLyPr
WHERE (((Mid([strLy],3,2))=[tlkpPrLy].[strAaK]));
SELECT [login to view URL], [login to view URL]
FROM tlkpPrLy, tlkpLyPr
WHERE (((Mid([strLy],5,2))=[tlkpPrLy].[strAaK]));
Expected output:
Table tlkpLyDtl shows the expected output based on sample records in tlkpLyPr and tlkpPrLy
Requirements:
1) Create procedures/functions in the attached Access database, dbJob014
2) Process should execute from the command button cmdTest on frmTest
3) Code should be commented with explanations of how it works
Attached:
::dbJob014
::tlkpLyPr
::tlkpPrLy
::tlkpPrLy
::frmTest