Hi everyone, I was wondering if anyone could help me with making what I want to do more efficient. I need to be able to export 5 tables to 1 Excel workbook. The catch is that the tables are all linked on a one-to-one basis with a MainTable. All the tables have an ID field, which is the linking field. However, I need to be able to filter the MainTable by 3 fields, and then export all the tables with only the records that are in the MainTable. I hope I have made that clear, but if not, here is a query which I am going to have to reproduce for each of the subordinate tables:
SELECT tblReasonLeaving.ID, tblReasonLeaving.sngDismissal, tblReasonLeaving.sngEndOfCont, tblReasonLeaving.sngRedunComp
FROM tblMainData INNER JOIN tblReasonLeaving ON tblMainData.ID = tblReasonLeaving.ID
WHERE (((tblMainData.strOrgCode)="5H2"
AND ((tblMainData.strMonth)=3) AND ((tblMainData.strYear)="03/04"
);
I will then have to export this query to Excel, along with the other tables.
Is there an easier way of doing this kind of thing, preferably without the need for creating these queries, and I would like it to be as fast as possible.
Thanks,
Nick Meacoe
MrM@boltblue.com
SELECT tblReasonLeaving.ID, tblReasonLeaving.sngDismissal, tblReasonLeaving.sngEndOfCont, tblReasonLeaving.sngRedunComp
FROM tblMainData INNER JOIN tblReasonLeaving ON tblMainData.ID = tblReasonLeaving.ID
WHERE (((tblMainData.strOrgCode)="5H2"
I will then have to export this query to Excel, along with the other tables.
Is there an easier way of doing this kind of thing, preferably without the need for creating these queries, and I would like it to be as fast as possible.
Thanks,
Nick Meacoe
MrM@boltblue.com