S
Stephen
Hi all.. need more help please. fourth posting... I'm looking for any ideas. Thanks
John identified my issue, which is described below.. but I’m not sure if I can resolve this, as I’m unable to define relationships in the main database. This is because I have a procedure that imports records from a txt file, but the import itself violates relationships. Thus if I have the relationships linked the import fails with errors. Once the import is finished the database then adds the required fields in the related tables
The relationships in the queries are linked, but do not provide the same link as would the relation one to many in main database. Why can I not get the same multikey link in queries, when I can in the relationships screen
The TblHistStaticData (Many) and TblUsers (one) have two primary keys that are linked separately both use the relationship; ‘only include rows where the joined fields from both tables are equal’. The table TblUsers (Many) and TblDesk (one) is joined by one foreign key in each table
Is there a way to get around this without setting up relationships in the main database?
Thanks again for your help!
**...Followng taken from a previous posting..******.......
What are the relationships between the three tables? A query will be updatable only if there's a clear one-to-many chain on Primary (or unique) keys linked to foreign keys. For example, this should be updatable if the relationships are
tblDesks 1->M tblUsers 1->M tblHistStatDat
.... but it won't be updatable if the relationships are
tblDesks M<-1 tblUsers 1->M tblHistStatDat
John Viescas, autho
"Microsoft Office Access 2003 Inside Out
"Running Microsoft Access 2000
"SQL Queries for Mere Mortals
http://www.viescas.com
(Microsoft Access MVP since 1993
John identified my issue, which is described below.. but I’m not sure if I can resolve this, as I’m unable to define relationships in the main database. This is because I have a procedure that imports records from a txt file, but the import itself violates relationships. Thus if I have the relationships linked the import fails with errors. Once the import is finished the database then adds the required fields in the related tables
The relationships in the queries are linked, but do not provide the same link as would the relation one to many in main database. Why can I not get the same multikey link in queries, when I can in the relationships screen
The TblHistStaticData (Many) and TblUsers (one) have two primary keys that are linked separately both use the relationship; ‘only include rows where the joined fields from both tables are equal’. The table TblUsers (Many) and TblDesk (one) is joined by one foreign key in each table
Is there a way to get around this without setting up relationships in the main database?
Thanks again for your help!
**...Followng taken from a previous posting..******.......
What are the relationships between the three tables? A query will be updatable only if there's a clear one-to-many chain on Primary (or unique) keys linked to foreign keys. For example, this should be updatable if the relationships are
tblDesks 1->M tblUsers 1->M tblHistStatDat
.... but it won't be updatable if the relationships are
tblDesks M<-1 tblUsers 1->M tblHistStatDat
John Viescas, autho
"Microsoft Office Access 2003 Inside Out
"Running Microsoft Access 2000
"SQL Queries for Mere Mortals
http://www.viescas.com
(Microsoft Access MVP since 1993
Stephen. said:I have a query that that takes data from three tables. These tables have been linked inside the query. My problem is that when the query is run, it will not enable users to add additional records to the main table (tblHistStatData). see below for sql
tblHistStatData.UserTotal, tblHistStatData.CreateTime, tblHistStatData.SourceType, tblHistStatData.errors, tblHistStatData.SWIFTS, tblHistStatData.MEPS, tblHistStatData.ARIES, tblUsers.GroupName, TblDesks.CodSELECT tblHistStatData.Unit, tblHistStatData.UserID, tblHistStatData.RepoDate, tblHistStatData.PayRecZ, tblHistStatData.PayRecNotZ, tblHistStatData.Deferred, tblHistStatData.DMIUpdate, tblHistStatData.TradeSupport, tblHistStatData.VerifyAccept, tblHistStatData.VerifyReject, tblHistStatData.AuthorizeAccept, tblHistStatData.AuthorizeReject, tblHistStatData.DSSInput, tblHistStatData.CLLInput,tblHistStatData.MovementCutOff, tblHistStatData.ConfirmationMatch
WHERE (((tblHistStatData.RepoDate) Between #1/1/2004# And #2/9/2004#) AND ((TblDesks.Code) Like [Please enter desk officers initials] & "*"))FROM tblHistStatData INNER JOIN (tblUsers INNER JOIN TblDesks ON tblUsers.GroupName = TblDesks.DeskName) ON (tblHistStatData.UserID = tblUsers.UserID) AND (tblHistStatData.Unit = tblUsers.Unit