Any idea why...

G

Guest

I have the following SQL code for a query that joins 3 tables so I could
enter data.

SELECT tblInmGangData.DOCNumber, inmtinfo.IN_NAME, tblInmGangData.NName,
tblInmGangData.Rank, inmtinfo.IN_OFFENSE, inmtinfo.IN_CMTCNTY,
inmtinfo.IN_SNTCLAS, inmtinfo.IN_EFFDATE, inmtinfo.IN_MINDATE,
inmtinfo.IN_MAXDATE, inmtinfo.IN_MINSNT, inmtinfo.IN_MAXSNT, inmtinfo.IN_WA1,
tblInmGangData.STGMisconducts, tblInmGangData.Comments, tblInmGangData.Photo,
tblInmGangData.Tattoo1, tblInmGangData.Tattoo2, tblInmGangData.Tattoo3,
tblInmGangData.Files, tblGang.GangName, [IN_BLDING] & "-" & [IN_SECTION] &
"-" & [IN_CELLDRM] & "-" & [IN_BEDNUM] AS BSCB, tblInmGangData.Inactive
FROM tblGang RIGHT JOIN (tblInmGangData INNER JOIN inmtinfo ON
tblInmGangData.DOCNumber = inmtinfo.IN_INMNUM) ON tblGang.GangID =
tblInmGangData.Affilation
WHERE (((tblGang.GangName)=[Enter Affiliation]) AND
((tblInmGangData.Inactive)=False));

It worked till I found out that an Inmate could be a member of more than one
gang so I had to change the primary key in the tblInmGangData from just
DOCNuber to DOCNumber and Affilation now I can not edit any of the data in my
query.


I posted this yesterday on Programming but got no help.
Any ideas would be helpful.
 
G

Guest

I would break out some of the tables and use subforms. I rarely bind a form
to more than a single table. Each related table can be easily edited in a
subform.
 

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

Similar Threads


Top