I have a form with a subform postcode lookup.
I currently have the SQL
SELECT Sites.Site, Sites.Region, Sites.[Site Group], Sites.Street, Sites.City, Sites.[Postal Code], Sites.[Vetting Location]
FROM Sites
WHERE (((Sites.[Postal Code])=[forms]![Site Search]![postsearch]"));
But wanted to be able to search only part of the Post Code.
I've changed the SQL to
SELECT Sites.Site, Sites.Region, Sites.[Site Group], Sites.Street, Sites.City, Sites.[Postal Code], Sites.[Vetting Location]
FROM Sites
WHERE (((Sites.[Postal Code]) Like "*[forms]![Site Search]![postsearch]"));
But no sites are found regardless of part or full postcode being used.
Any ideas?
I currently have the SQL
SELECT Sites.Site, Sites.Region, Sites.[Site Group], Sites.Street, Sites.City, Sites.[Postal Code], Sites.[Vetting Location]
FROM Sites
WHERE (((Sites.[Postal Code])=[forms]![Site Search]![postsearch]"));
But wanted to be able to search only part of the Post Code.
I've changed the SQL to
SELECT Sites.Site, Sites.Region, Sites.[Site Group], Sites.Street, Sites.City, Sites.[Postal Code], Sites.[Vetting Location]
FROM Sites
WHERE (((Sites.[Postal Code]) Like "*[forms]![Site Search]![postsearch]"));
But no sites are found regardless of part or full postcode being used.
Any ideas?