Hi all,
I'm wondering if anyone else has found a workaround for this problem. When using a "user-friendly" criteria selection form in conjunction with a report (a technique I learned way back from the solutions.mdb sample database from Microsoft), I'm finding that whenever I use 'Like "*" & forms!frmFormName!FieldName' as the criteria for a report, I get not quite right results. I'm using the 'Like "*" &' configuration because I want the user to have the option of either selecting a value from the dropdown box to filter on that value, or leaving it blank to get all records. However, let's say I want to filter on a value such as "Assigned to" and the row source for that field on the criteria form is a table with 32 names, each with an autonumber identifier. If I select the name with the ID number of 2, I get results for ID 2, 12, 22, 32, etc. Because after all, 2 is "like" 12, 22, and 32, I suppose.
I know I can get around this by building the query on the fly after the criteria selections are made, but I was hoping for a simpler solution.
Any other suggestions?
(Btw, I've also used Like forms!frmFormName!frmFieldName OR forms!frmFormName!frmFieldName Is Null with the same results).
Thanks in advance.
I'm wondering if anyone else has found a workaround for this problem. When using a "user-friendly" criteria selection form in conjunction with a report (a technique I learned way back from the solutions.mdb sample database from Microsoft), I'm finding that whenever I use 'Like "*" & forms!frmFormName!FieldName' as the criteria for a report, I get not quite right results. I'm using the 'Like "*" &' configuration because I want the user to have the option of either selecting a value from the dropdown box to filter on that value, or leaving it blank to get all records. However, let's say I want to filter on a value such as "Assigned to" and the row source for that field on the criteria form is a table with 32 names, each with an autonumber identifier. If I select the name with the ID number of 2, I get results for ID 2, 12, 22, 32, etc. Because after all, 2 is "like" 12, 22, and 32, I suppose.
I know I can get around this by building the query on the fly after the criteria selections are made, but I was hoping for a simpler solution.
Any other suggestions?
(Btw, I've also used Like forms!frmFormName!frmFieldName OR forms!frmFormName!frmFieldName Is Null with the same results).
Thanks in advance.
Last edited: