Hi,
I am trying to create a query that shows data based on the selection of engineers selected in a multi select list box and date range.
The query works fine with just the date range selected, but when I try and filter the engineers to those that i want i am having problems.
I have a multi select list box, and when i press a button, it goes through each selected and create a string of the ID's i have selected, IE 1, 3, 65, 45 etc.
I have then created a temp var that shows as the above, the plan was to put a criteria in the query of
IE
When typed in as the second example, works fine, however doesn't work with the first using the temp var. I have tried setting a parameter to interger but this still doesn't work.
I have put the string into a text box in the main form and referenced that and it doesn't work.
I am hitting a brick wall now and can't think how to get past it, should be simple but am struggling.
Anyone have any idea's?
I am trying to create a query that shows data based on the selection of engineers selected in a multi select list box and date range.
The query works fine with just the date range selected, but when I try and filter the engineers to those that i want i am having problems.
I have a multi select list box, and when i press a button, it goes through each selected and create a string of the ID's i have selected, IE 1, 3, 65, 45 etc.
I have then created a temp var that shows as the above, the plan was to put a criteria in the query of
Code:
Criteria: In ([TempVars]![tmpIDS])
IE
Code:
Criteria: In (1, 43, 23, 23)
When typed in as the second example, works fine, however doesn't work with the first using the temp var. I have tried setting a parameter to interger but this still doesn't work.
I have put the string into a text box in the main form and referenced that and it doesn't work.
I am hitting a brick wall now and can't think how to get past it, should be simple but am struggling.
Anyone have any idea's?