the main info is in HBC_zImport which was imported from access in raw form. I broke that tbl into 2 tbl's, 1 for Alpha and the other tbl for Numerical violations. these 2 tbl's had a field that is 3 characters long to combine into one to form a violation. which is already six characters long in the HBC_zImport tbl.
In the HBC_violation_boiler_Inspection_Link, the fields are alpha...ID, Num...ID and Boiler_Inspection_ID. I want to relate this current tbl with the data in HBC_zImport that has the raw data of violations. So, basically what i'm trying to do is relate the violations to the boiler_inspection_ID.
If you need more clarification please email me!!!!!!!!!
strSQL = "Select Violations from HBC_zImport"
set rs1 = objConn.Execute(strSQL)
strSQL = "Select * from HBC_Alpha_Violation_CodeDef"
set rs2 = objConn.Execute(strSQL)
strSQL = "Select * from HBC_Num_Violation_CodeDef"
set rs3 = objConn.Execute(strSQL)
strSQL = "Select * from HBC_Boiler_Inspection"
set rs4 = objCOnn.Execute(strSQL)
Do While NOT rs1.EOF
rs2.Movement()
Do While NOT rs2.EOF
rs3.Movement()
Do While NOT rs3.EOF
rs4.Movement()
Do While NOT rs4.EOF
strSQL = "Insert into HBC_Violation_Boiler_Inspection_Link (Alpha_Violation_CodeDef_ID, Num_Violation_CodeDef_ID, Boiler_Inspection_ID) "
strSQL = strSQL & VALUES ('" & replace(rs2("ID"), "'", "''") & "', '" & replace(rs3("ID"), "'", "''") & "', '"replace(rs4("ID"); "