I have an Access DB with a LOT of tables in it.
One of them is tblSessionLog
tblSessionLog holds, SessionID, CaID, PLID and sevaral other things
The tblCasino links to tblCity which links to tblState, etc
tblPlayer links to several more tables.
All IDs ar unque primary keys.
At this piont there are almost 200 businesses and a couple of dozen Players in the tables
But there are only 2 log entries.
I'm trying to pull those 2 log entries, along with all the other info they chain to.
Here's the string I'm using;
It pulls the info, but when I check the RecordCount it holds 638820!Code:sSQL = "SELECT * FROM tblSessionLog tS, tblHeat tH, tblPlayer tPl, tblAlias tA, " & _ "tblPersona tP, tblBodyType tB, tblHairColor tHC, tblHairLength tHL, " & _ "tblFacialHair tFH, tblMustache tM, tblEyeColor tE, tblGlasses tG, tblClothing tCl, " & _ "tblTable tT, tblCasino tCa, tblCity tCi, tblState tSt, tblCountry tCnt " & _ "WHERE tS.UserID = " & CStr(g_lUserID) & " AND tS.CaID = tCa.CaID AND tH.HID = tS.HID " & _ "AND tS.PLID = tPl.PLID AND tA.AID = tPl.AID AND tP.PID = tPl.PID " & _ "AND tB.BID = tPl.BID AND tHC.HCID = tPl.HCID AND tHL.HLID = tPl.HLID " & _ "AND tFH.FID = tPl.FID AND tM.MID = tPl.MID AND tE.EID = tPl.EID AND " & _ "tG.GID = tPl.GID"
What do I do here?




Reply With Quote