I have a customer database and I am building a select query with criteria based upon the selection of multiple records from at least 4 list boxes on a form called "Search_Select". The idea is that one or more of the list boxes is used for the extraction of the data using multiple selection criteria.
My 4 list boxes are:
List_Status (2 cols, Code / Desc), widths 0,2 bound column 1
List City (1 Col, City)
List County (1 Col, County)
List_Country (1 Col, Country)
I am hoping to add more list boxes to give more selection criteria in future.
What I would like to do is to put the multiple selections from the list boxes into a number of tables S_TYPE, S_CITY, S_COUNTY & S_COUNTRY and then link these to the main database tables as part of the query. If no selection is made from a list box then all records from the list box should be put into the table so that all matching records are selected as a default.
Can someone tell me if this is the best way to do this or if there is an easier way ?
What would be the code to copy the multiple selected records from each of the list boxes to get them into the tables and if nothing is selected from the list box all records from the list boxes are copied to the respective tables
?
My 4 list boxes are:
List_Status (2 cols, Code / Desc), widths 0,2 bound column 1
List City (1 Col, City)
List County (1 Col, County)
List_Country (1 Col, Country)
I am hoping to add more list boxes to give more selection criteria in future.
What I would like to do is to put the multiple selections from the list boxes into a number of tables S_TYPE, S_CITY, S_COUNTY & S_COUNTRY and then link these to the main database tables as part of the query. If no selection is made from a list box then all records from the list box should be put into the table so that all matching records are selected as a default.
Can someone tell me if this is the best way to do this or if there is an easier way ?
What would be the code to copy the multiple selected records from each of the list boxes to get them into the tables and if nothing is selected from the list box all records from the list boxes are copied to the respective tables
?