C
Cheese_whiz
Hi all,
I've got an application with what amounts to the main query being based on
two main tables and several other smaller tables. The two main tables are
tblPeople and tblEvents, with the app being built around tblevents.
Because there are three people associated with three events (I guess), there
are three copies of the tblPeople in the query design view: one for each role
a person plays in an event. The first tblperson is joined tblPerson.ID to
tblEvents.Person1 and the second tblpersonCopy2.ID to tblEvents.Person2 and
so on for the third table.
Isn't that wrong? Shouldn't it just be one copy of the tblPersons with
three joins coming from it to the tblEvents and each join being all records
from events with just the matching from Persons.
I'm trying to clean this app up and I tried setting it up with one
tblPersons in that query as described above. The query returns all the
records (like it does when three tables are used), but when I try to switch
the main form over to using the new query (the one with only one copy of
tblPersons in design view) and then open the form, I get an error message
saying it can't go to the specified record.
Well, the specified record is simply:
DoCmd.GoToRecord , , acNewRec
Does the query need three copies of that table to handle three different
joins and if not, is there some reason that line above wouldn't work given
the way I setup the 'new' query (the one with only one copy of tblPersons).
Even if I don't get an answer to the second question it would be invaluable
to know the answer to the first.
As always, TIA,
CW
I've got an application with what amounts to the main query being based on
two main tables and several other smaller tables. The two main tables are
tblPeople and tblEvents, with the app being built around tblevents.
Because there are three people associated with three events (I guess), there
are three copies of the tblPeople in the query design view: one for each role
a person plays in an event. The first tblperson is joined tblPerson.ID to
tblEvents.Person1 and the second tblpersonCopy2.ID to tblEvents.Person2 and
so on for the third table.
Isn't that wrong? Shouldn't it just be one copy of the tblPersons with
three joins coming from it to the tblEvents and each join being all records
from events with just the matching from Persons.
I'm trying to clean this app up and I tried setting it up with one
tblPersons in that query as described above. The query returns all the
records (like it does when three tables are used), but when I try to switch
the main form over to using the new query (the one with only one copy of
tblPersons in design view) and then open the form, I get an error message
saying it can't go to the specified record.
Well, the specified record is simply:
DoCmd.GoToRecord , , acNewRec
Does the query need three copies of that table to handle three different
joins and if not, is there some reason that line above wouldn't work given
the way I setup the 'new' query (the one with only one copy of tblPersons).
Even if I don't get an answer to the second question it would be invaluable
to know the answer to the first.
As always, TIA,
CW