In Progress

vb/vba procedure to populate a junction table

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, [url removed, login to view], 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 [url removed, login to view], [url removed, login to view]

FROM tlkpPrLy, tlkpLyPr

WHERE (((Mid([strLy],1,2))=[tlkpPrLy].[strAaK]));

SELECT [url removed, login to view], [url removed, login to view]

FROM tlkpPrLy, tlkpLyPr

WHERE (((Mid([strLy],3,2))=[tlkpPrLy].[strAaK]));

SELECT [url removed, login to view], [url removed, login to view]

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

Skills: Visual Basic for Apps

See more: adding data column table access via vba, sql copy table stored procedure, return table stored procedure, tsql update table store procedure, access table populate table website, copy table stored procedure, table excel refresh vba, can copy table table stored procedure, tsql return table stored procedure, mssql copy table stores procedure, copy data table store procedure, copy paste table text word vba, import procedure vba, sql 2000 saving results table stored procedure, calling oracle procedure vba macro

About the Employer:
( 8 reviews ) Lincoln, United States

Project ID: #11398118