K
Ken Kazinski
I am programming a query with the string. I started in the query editor
SELECT tblAnnex03_Notes.UnitID, tblAnnex03_Notes.Notes
FROM (tblMSC_ClassID INNER JOIN tblUnits ON tblMSC_ClassID.ID =
tblUnits.ClassID) LEFT JOIN tblAnnex03_Notes ON tblUnits.UnitID =
tblAnnex03_Notes.UnitID
WHERE (((tblMSC_ClassID.GroupName) Like "skiff*"));
and converted the query editor to a string to be used in my VB module.
strSql = "SELECT tblAnnex03_Notes.UnitID, tblAnnex03_Notes.Notes"
strSql = strSql & " FROM (tblMSC_ClassID INNER JOIN tblUnits ON
tblMSC_ClassID.ID = tblUnits.ClassID) LEFT JOIN tblAnnex03_Notes ON
tblUnits.UnitID = tblAnnex03_Notes.UnitID"
strSql = strSql & " WHERE (((tblMSC_ClassID.GroupName) = " & Chr$(34) &
"skiff*" & Chr$(34) & "))"
The query from the query editor returns records but the query using VB did
not.
Any help would be great.
SELECT tblAnnex03_Notes.UnitID, tblAnnex03_Notes.Notes
FROM (tblMSC_ClassID INNER JOIN tblUnits ON tblMSC_ClassID.ID =
tblUnits.ClassID) LEFT JOIN tblAnnex03_Notes ON tblUnits.UnitID =
tblAnnex03_Notes.UnitID
WHERE (((tblMSC_ClassID.GroupName) Like "skiff*"));
and converted the query editor to a string to be used in my VB module.
strSql = "SELECT tblAnnex03_Notes.UnitID, tblAnnex03_Notes.Notes"
strSql = strSql & " FROM (tblMSC_ClassID INNER JOIN tblUnits ON
tblMSC_ClassID.ID = tblUnits.ClassID) LEFT JOIN tblAnnex03_Notes ON
tblUnits.UnitID = tblAnnex03_Notes.UnitID"
strSql = strSql & " WHERE (((tblMSC_ClassID.GroupName) = " & Chr$(34) &
"skiff*" & Chr$(34) & "))"
The query from the query editor returns records but the query using VB did
not.
Any help would be great.