Query Issue

M

Michelle

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.
 

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

Any idea why... 1
Problem with Update Query 1
Runtime Error .Refresh 1
Union/Join issue 1
Not sure if this can be done in access 1
Union Query Problem 4
Union Query Issue 1
Union issue 1

Top