add record in query with related links

S

Stephen.

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.

Is it possible for me to let the user add extra records

Many thanks for your efforts in advance

Stephen

SELECT 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, tblHistStatData.UserTotal, tblHistStatData.CreateTime, tblHistStatData.SourceType, tblHistStatData.errors, tblHistStatData.SWIFTS, tblHistStatData.MEPS, tblHistStatData.ARIES, tblUsers.GroupName, TblDesks.Cod
FROM tblHistStatData INNER JOIN (tblUsers INNER JOIN TblDesks ON tblUsers.GroupName = TblDesks.DeskName) ON (tblHistStatData.UserID = tblUsers.UserID) AND (tblHistStatData.Unit = tblUsers.Unit
WHERE (((tblHistStatData.RepoDate) Between #1/1/2004# And #2/9/2004#) AND ((TblDesks.Code) Like [Please enter desk officers initials] & "*"))
 
J

John Viescas

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 tblHistStatData

... but it won't be updatable if the relationships are:

tblDesks M<-1 tblUsers 1->M tblHistStatData

--
John Viescas, author
"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.
Is it possible for me to let the user add extra records?

Many thanks for your efforts in advance.

Stephen.

SELECT 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,
tblHistStatData.UserTotal, tblHistStatData.CreateTime,
tblHistStatData.SourceType, tblHistStatData.errors, tblHistStatData.SWIFTS,
tblHistStatData.MEPS, tblHistStatData.ARIES, tblUsers.GroupName,
TblDesks.Code
FROM tblHistStatData INNER JOIN (tblUsers INNER JOIN TblDesks ON
tblUsers.GroupName = TblDesks.DeskName) ON (tblHistStatData.UserID =
tblUsers.UserID) AND (tblHistStatData.Unit = tblUsers.Unit)
WHERE (((tblHistStatData.RepoDate) Between #1/1/2004# And #2/9/2004#) AND
((TblDesks.Code) Like [Please enter desk officers initials] & "*"));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top