Select m m
Hi
just need some clarification.
I set up 2 temporary variable
via a button and then opened a form based on a query using the variables as criteria
Code:
SELECT tbl_Parish.Parish, tbl_Church.Church, tbl_Banns.FicheRef, tbl_Banns.PageNo, tbl_Banns.EntryNo, tbl_Banns.DateOfBanns, tbl_Banns.YearOfBanns, tbl_Banns.GroomForenames, tbl_Banns.GroomSurname, tbl_Banns.GroomOccupation, tbl_Banns.GroomAbode, tbl_Banns.Minister, tbl_Banns.BrideForenames, tbl_Banns.BrideSurname, tbl_Banns.BrideAbode, tbl_Banns.BrideCondition, tbl_Banns.BrideOccupation, tbl_Banns.BannsId
FROM tbl_Parish INNER JOIN (tbl_Church INNER JOIN tbl_Banns ON tbl_Church.ChurchID = tbl_Banns.ChurchId_fk) ON tbl_Parish.ParishID = tbl_Church.ParishID_fk
WHERE (((tbl_Banns.BrideForenames) Like [TempVars]![varBrideForenames] & "*") AND ((tbl_Banns.BrideSurname) Like [TempVars]![varBrideSurname] & "*"))
ORDER BY tbl_Banns.YearOfBanns;
Ok if I set varBrideForenames to A and varBrideSurname to M and then run the query it seems to work but
All the surnames begin with M or contain M but the forenames list contains five entries starting or containing M but it also included the forenames Eliza and Sarah.
Is this because the Surname begins with M? So it satisfies one of the criteria?
thanks
Ian