I'm needing to pull information from one access database into another. The database that I am pulling from has undergone some changes so I can no longer do a straight join to get all the information that I need.
Basic layout:
Primary Table: PRD_Header (key field PRDKEY)
Linked table: NTC_Vehicle (has PRDKEY to link to PRD_Header, and CollKey to link to the Vehicles table)
Vehicles table: has CollKey and some other fields about vehicles
I need to get all the rows from PRD_Header and all the related data from Vehicles if there is any there but not every PRD_Header row has a link to a NTC_Vehicle/Vehicle.
To figure out how to get the data I ended up creating a GetVehicles query that joined NTC_Vehicle and Vehicle and then used that query with PRD_Header but I can't leave the query in the 2nd database and I'm not sure how to do it through vba since I don't have a persistent connection to the tables in the 2nd database.
Make sense?
Basic layout:
Primary Table: PRD_Header (key field PRDKEY)
Linked table: NTC_Vehicle (has PRDKEY to link to PRD_Header, and CollKey to link to the Vehicles table)
Vehicles table: has CollKey and some other fields about vehicles
I need to get all the rows from PRD_Header and all the related data from Vehicles if there is any there but not every PRD_Header row has a link to a NTC_Vehicle/Vehicle.
To figure out how to get the data I ended up creating a GetVehicles query that joined NTC_Vehicle and Vehicle and then used that query with PRD_Header but I can't leave the query in the 2nd database and I'm not sure how to do it through vba since I don't have a persistent connection to the tables in the 2nd database.
Make sense?