multiple postcode criteria selection

E

efandango

I want to be able to select multiple postcodes for a selection criteria.
These are British 'main' postcodes. eg: SW3, SW5, NW2, NW7, N1, N2 and so
on...

Ideally I would like to be able to input as many as I need to (with sensible
limits), they will most likely be limited to a maximum of 6.

this is my exisiting SQL: (which omly allows for 1 postcode criteria)

SELECT tbl_Points.Point_ID, tbl_Points.Run_point_Venue,
tbl_Points.Run_point_Address, tbl_Points.Run_Point_Postcode,
tbl_Points.Run_Point_Postcode AS pcode1, tbl_Points.LeaveBy1,
tbl_Points.LeaveBy2, tbl_Points.LeaveBy3, tbl_Points.LeaveBy4
FROM tbl_Points
WHERE (((tbl_Points.Run_Point_Postcode)=[pcode]) AND
((tbl_Points.Unpointed)=-1));
 
D

Duane Hookom

I don't care much for parameter queries, however, you could try:
SELECT tbl_Points.Point_ID, tbl_Points.Run_point_Venue,
tbl_Points.Run_point_Address, tbl_Points.Run_Point_Postcode,
tbl_Points.Run_Point_Postcode AS pcode1, tbl_Points.LeaveBy1,
tbl_Points.LeaveBy2, tbl_Points.LeaveBy3, tbl_Points.LeaveBy4
FROM tbl_Points
WHERE Instr([Enter pcodes separated by a comma], Run_Point_Postcode) > 0[
AND tbl_Points.Unpointed =-1;

If I were to build this, I would probably use a multi-select list box on a
form.
 

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

Top