Issue:
I am developing a simple issue tracking database and havehit a stumbling block that I’m not sure how to resolve. Have tried severalapproaches using queries, sql statement etc but still not working. I may have torethink how I am doing this but hoping someone may be able to address the issueas it stands, though if a more elegant way of doing it happy to implement that.
Scenario:
A table called tblUsershas a field called Access that is alookup to a table called tblCategoryand allows for multiple values to be stored (one to many). In essence this issaying which category(s) of “issue” the user is allowed to see.
A simple msgbox test in code shows that this is correctlystoring the values selected in the following format
In turn, each issue can only have a single category(one to one) which is stored in a field called Category in table tblGMPIssuesand is also populated from a lookup to the tblCategorytable.
So far so good ….
I then have a query called qryUserIssues that should show all issues from the table tblGMPIssues that are a) “Open” (status= 1) and that b) match any of the categories that the user is permitted toview.
I can get this to work with a single value i.e. as it standsquery prompts for input and returns expected results i.e. lists records that match that single value, but I can’t work out the syntax to get the criteria toaccommodate multiple values. For example, in above scenario our user should beallowed to see 4 different category or calls “1, 2, 3, 4”
Tried using various JOINS, tried assigning to variables andusing a LIKE criteria but can’t seem to get the syntax right.
If anyone could let me know if this can be done and if sohow as it’s driving me nuts J
All help and suggestions gratefully received.