C
Cynde via AccessMonster.com
Hello. I am working on a meeting dbase and I have got to this point with help
from this site but am stuck here. Due to the intricacy of some agendas, I
have had to add levels so to speak with more agenda tables. I have 5 levels
total so far. Each of the agenda level tables are set up the
same as the original agenda table but with identifying level names.
tblAgendaItems
AgendaID (autonumber, primary key)
MtgID (foreign key)
AgendaItem
AgendaItemName
AgendaItemMinutes
tblAgendaItemsLevel2
AgendaIDLevel2 (foreign key to AgendaID)
MtgID (Number)
AgendaItemLevel2
AgendaItemNameLevel2
AgendaItemMinLevel2
each of the tables after that up to level 4 are set up the same way.
In the relationships, I have the tblAgendaItems related to the
tblMeetingTable in a one-many via MtgID. I have the tblAgendaItems related
via the AgendaID in one-one with tblAgendaItemsLevel2 and then
tbleAgendaItemsLevel2 as a one-one with the level 3 table and level 3 table
as a one-one with level 4 table. I have tried several different
relationships as well as different syntaxes for the SQL and I can't get it to
work. I'm sure my syntax is incorrect but I can't figure out how to get to
the subsubform of level 2 (haven't got beyond level 2 yet). Each subform of
agendaitems (level 2, 3, 4) are subforms of the level above and I have them
set as continuous forms (although I did try single form and that didn't work
either). Below is my current syntax for the level 2 sql which I have edited
many times over in the last few days with no luck. I have also included my
syntax (drawn from yours) that I used to connect the meeting names with
agendas (which works very well). I am trying to get the AgendaIDs to flow
down to level 2 as well as the AgendaItem (text as number). I've tried
putting the sql into different forms and into different events and still am
without a clue as to what I'm doing incorrectly. Perhaps I'm tackling this
all wrong. Any suggestions or direction would be greatly appreciated.
This one directly (my guesstimate) below doesn't work. This is to a subform
(level2) of the
subform (AgendaItems) of the mainform (Meetings).
INSERT INTO AgendaItemsLevel2 ( AgendaItemLevel2, AgendaIDLevel2 )
SELECT AgendaItems.AgendaItem, AgendaItems.AgendaID
FROM AgendaItems INNER JOIN AgendaItemsLevel2 ON AgendaItems.AgendaID =
AgendaItemsLevel2.AgendaIDLevel2
WHERE (((AgendaItems.MtgID)=[AgendaItemsLevel2].[MtgID]));
Below is the one adapted from your example and it works. This is for a direct
subform to the meeting form.
INSERT INTO AgendaItems ( MtgID, AgendaItem, AgendaItemName )
SELECT Forms!MeetingForm!MtgID, AgendaItems.AgendaItem, AgendaItems.
AgendaItemName
FROM MeetingNamesTable INNER JOIN AgendaItems ON MeetingNamesTable.
MtgID=AgendaItems.MtgID
WHERE MeetingNamesTable.MeetingName=Forms!MeetingForm!MeetingName;
Is there a way to write a syntax that will flow down each level of agenda?
Thanks very much.
Cynde
from this site but am stuck here. Due to the intricacy of some agendas, I
have had to add levels so to speak with more agenda tables. I have 5 levels
total so far. Each of the agenda level tables are set up the
same as the original agenda table but with identifying level names.
tblAgendaItems
AgendaID (autonumber, primary key)
MtgID (foreign key)
AgendaItem
AgendaItemName
AgendaItemMinutes
tblAgendaItemsLevel2
AgendaIDLevel2 (foreign key to AgendaID)
MtgID (Number)
AgendaItemLevel2
AgendaItemNameLevel2
AgendaItemMinLevel2
each of the tables after that up to level 4 are set up the same way.
In the relationships, I have the tblAgendaItems related to the
tblMeetingTable in a one-many via MtgID. I have the tblAgendaItems related
via the AgendaID in one-one with tblAgendaItemsLevel2 and then
tbleAgendaItemsLevel2 as a one-one with the level 3 table and level 3 table
as a one-one with level 4 table. I have tried several different
relationships as well as different syntaxes for the SQL and I can't get it to
work. I'm sure my syntax is incorrect but I can't figure out how to get to
the subsubform of level 2 (haven't got beyond level 2 yet). Each subform of
agendaitems (level 2, 3, 4) are subforms of the level above and I have them
set as continuous forms (although I did try single form and that didn't work
either). Below is my current syntax for the level 2 sql which I have edited
many times over in the last few days with no luck. I have also included my
syntax (drawn from yours) that I used to connect the meeting names with
agendas (which works very well). I am trying to get the AgendaIDs to flow
down to level 2 as well as the AgendaItem (text as number). I've tried
putting the sql into different forms and into different events and still am
without a clue as to what I'm doing incorrectly. Perhaps I'm tackling this
all wrong. Any suggestions or direction would be greatly appreciated.
This one directly (my guesstimate) below doesn't work. This is to a subform
(level2) of the
subform (AgendaItems) of the mainform (Meetings).
INSERT INTO AgendaItemsLevel2 ( AgendaItemLevel2, AgendaIDLevel2 )
SELECT AgendaItems.AgendaItem, AgendaItems.AgendaID
FROM AgendaItems INNER JOIN AgendaItemsLevel2 ON AgendaItems.AgendaID =
AgendaItemsLevel2.AgendaIDLevel2
WHERE (((AgendaItems.MtgID)=[AgendaItemsLevel2].[MtgID]));
Below is the one adapted from your example and it works. This is for a direct
subform to the meeting form.
INSERT INTO AgendaItems ( MtgID, AgendaItem, AgendaItemName )
SELECT Forms!MeetingForm!MtgID, AgendaItems.AgendaItem, AgendaItems.
AgendaItemName
FROM MeetingNamesTable INNER JOIN AgendaItems ON MeetingNamesTable.
MtgID=AgendaItems.MtgID
WHERE MeetingNamesTable.MeetingName=Forms!MeetingForm!MeetingName;
Is there a way to write a syntax that will flow down each level of agenda?
Thanks very much.
Cynde