I have four table. The first table has three fields [planID] , [state] and [plan]. The next three tables are related to this one by [planID] field. What I want to do is a report where I get the information from the other tables where the [planID] matches in one report. I can do this for the first table and any one of the other three tables seperatly but nottogether. Is there away to do it?
Here are the three seperate queries:
--------------Query Program Contact-------------------
SELECT [State Plans].[planID] AS [State Plans_planID], [State Plans].[state] AS [State Plans_state], [State Plans].[plan], [Program Contact].[programcontactID], [Program Contact].[planID] AS [Program Contact_planID], [Program Contact].[name], [Program Contact].[title], [Program Contact]., [Program Contact].[phone], [Program Contact].[fax], [Program Contact].[address], [Program Contact].[city], [Program Contact].[state] AS [Program Contact_state], [Program Contact].[zip]
FROM [State Plans] INNER JOIN [Program Contact] ON [State Plans].[planID] =[Program Contact].[planID];
-----------Query Notes-----------------------
SELECT [State Plans].[planID] AS [State Plans_planID], [State Plans].[state], [State Plans].[plan], [Notes].[notesID], [Notes].[planID] AS Notes_planID, [Notes].[today's date], [Notes].[your name], [Notes].[note]
FROM [State Plans] INNER JOIN Notes ON [State Plans].[planID] =[Notes].[planID];
-------------Query State Contact---------------
SELECT [State Plans].[planID] AS [State Plans_planID], [State Plans].[state] AS [State Plans_state], [State Plans].[plan], [State Contacts].[statecontactID], [State Contacts].[planID] AS [State Contacts_planID], [State Contacts].[name], [State Contacts].[title], [State Contacts].[email], [State Contacts].[phone], [State Contacts].[fax], [State Contacts].[address], [State Contacts].[city], [State Contacts].[state] AS [State Contacts_state], [State Contacts].[zip]
FROM [State Plans] INNER JOIN [State Contacts] ON [State Plans].[planID] =[State Contacts].[planID];
My ideal Report:
State - Plan Name
State Contact info
Program Contact info
Notes on program
Thanks,
MAO
Here are the three seperate queries:
--------------Query Program Contact-------------------
SELECT [State Plans].[planID] AS [State Plans_planID], [State Plans].[state] AS [State Plans_state], [State Plans].[plan], [Program Contact].[programcontactID], [Program Contact].[planID] AS [Program Contact_planID], [Program Contact].[name], [Program Contact].[title], [Program Contact]., [Program Contact].[phone], [Program Contact].[fax], [Program Contact].[address], [Program Contact].[city], [Program Contact].[state] AS [Program Contact_state], [Program Contact].[zip]
FROM [State Plans] INNER JOIN [Program Contact] ON [State Plans].[planID] =[Program Contact].[planID];
-----------Query Notes-----------------------
SELECT [State Plans].[planID] AS [State Plans_planID], [State Plans].[state], [State Plans].[plan], [Notes].[notesID], [Notes].[planID] AS Notes_planID, [Notes].[today's date], [Notes].[your name], [Notes].[note]
FROM [State Plans] INNER JOIN Notes ON [State Plans].[planID] =[Notes].[planID];
-------------Query State Contact---------------
SELECT [State Plans].[planID] AS [State Plans_planID], [State Plans].[state] AS [State Plans_state], [State Plans].[plan], [State Contacts].[statecontactID], [State Contacts].[planID] AS [State Contacts_planID], [State Contacts].[name], [State Contacts].[title], [State Contacts].[email], [State Contacts].[phone], [State Contacts].[fax], [State Contacts].[address], [State Contacts].[city], [State Contacts].[state] AS [State Contacts_state], [State Contacts].[zip]
FROM [State Plans] INNER JOIN [State Contacts] ON [State Plans].[planID] =[State Contacts].[planID];
My ideal Report:
State - Plan Name
State Contact info
Program Contact info
Notes on program
Thanks,
MAO