fmm
Registered User.
- Local time
- Yesterday, 21:05
- Joined
- Mar 15, 2001
- Messages
- 76
I'm having a problem with relationships disappearing from queries.
Table1 has the field RecID.
Table2 has the fields RecID, Generation, and other data. The generation number is incremented each time updated data is appended for a given RecID.
The tables are linked by a 1-many relationship (in the query) between Table1 and Table2.
The goal is: for each RecID in table1, show the matching record in Table2 with the most recent data (i.e. the one with the maximum Generation value).
I tried to accomplish this by creating a query (call it qryMaxDataGen) that groups the data on RecID and the max of generation (MaxGen). The results of this query appear to work fine.
So I have the following relationships:
table1!RecID -> table2!RecID
table1!RecID -> qryMaxDataGen!RecID
qryMaxDataGen!MaxGen -> table2!Generation
This works great, except that when I reopen the query in design view the last relationship line is GONE.
I have many queries using this technique, some pulling the most current record from 3 other tables, and all have the query to table relationship. Sometimes they all disappear, sometimes just some of them, and sometimes all of them. I can't get the problem to repeat absolutely reliably (I opend and fixed a quey 3 time; the fourth time the I opend it the relationship was still there).
Any ideas?
Table1 has the field RecID.
Table2 has the fields RecID, Generation, and other data. The generation number is incremented each time updated data is appended for a given RecID.
The tables are linked by a 1-many relationship (in the query) between Table1 and Table2.
The goal is: for each RecID in table1, show the matching record in Table2 with the most recent data (i.e. the one with the maximum Generation value).
I tried to accomplish this by creating a query (call it qryMaxDataGen) that groups the data on RecID and the max of generation (MaxGen). The results of this query appear to work fine.
So I have the following relationships:
table1!RecID -> table2!RecID
table1!RecID -> qryMaxDataGen!RecID
qryMaxDataGen!MaxGen -> table2!Generation
This works great, except that when I reopen the query in design view the last relationship line is GONE.
I have many queries using this technique, some pulling the most current record from 3 other tables, and all have the query to table relationship. Sometimes they all disappear, sometimes just some of them, and sometimes all of them. I can't get the problem to repeat absolutely reliably (I opend and fixed a quey 3 time; the fourth time the I opend it the relationship was still there).
Any ideas?