Havent slept for three days trying to get a simple thing to work.
We use a form to report work in progress status. It has a comb box to select current stepname, but since not all steps apply to all job types, we added a text field to the table used by combo box for selection, with the job-type Id#. Say: 1,3,4,5 on one stepname 2,4,5 on another stepname, etc, the numbers corresponding to jobtypes.
We then changed the box to use a query (one table) with criteria on the text field:
Like "*" & [Form..]![IdType#] & "*"
This works fine for the first record, but does not change when the form passes to the next record (JOB) with diffrent job-type Id#.
Tried to fix that with "on enter" event procedure on comb box, that produces a new string with the correct IdType# each time the record moves, to use as the qry criteria. Was able to produce a str that evaluated to say:
Like "*5*"
or to
"*5*"
but the str, or Like str, written on the query criteria gets automatically attacked by Access and changed to "strCri" or Like "strCri" with no results. Like [str] does not work either.
What am I doing wrong? Is there a simpler way to get the combo box to present only those steps that apply to the job type?
Keep it simple, you can see I'm no expert.
We use a form to report work in progress status. It has a comb box to select current stepname, but since not all steps apply to all job types, we added a text field to the table used by combo box for selection, with the job-type Id#. Say: 1,3,4,5 on one stepname 2,4,5 on another stepname, etc, the numbers corresponding to jobtypes.
We then changed the box to use a query (one table) with criteria on the text field:
Like "*" & [Form..]![IdType#] & "*"
This works fine for the first record, but does not change when the form passes to the next record (JOB) with diffrent job-type Id#.
Tried to fix that with "on enter" event procedure on comb box, that produces a new string with the correct IdType# each time the record moves, to use as the qry criteria. Was able to produce a str that evaluated to say:
Like "*5*"
or to
"*5*"
but the str, or Like str, written on the query criteria gets automatically attacked by Access and changed to "strCri" or Like "strCri" with no results. Like [str] does not work either.
What am I doing wrong? Is there a simpler way to get the combo box to present only those steps that apply to the job type?
Keep it simple, you can see I'm no expert.