M
MSD
My query works when I use fixed values. However, when I use values from a
form, it doesn't work.
This is the difference in the saved query's SQL statement -
This one works:
SELECT ItemName, ItemNo
FROM tblItems
WHERE (ItemNo In (200,250,333));
This one doesn't work:
SELECT ItemName, ItemNo
FROM tblItems
WHERE (ItemNo In ([Forms]![myForm]![myText]));
myText contains comma separated values, such as: 100,200,300
My form contains a command button that opens the query after values are
entered in the text box.
Thanks very much,
Emma
form, it doesn't work.
This is the difference in the saved query's SQL statement -
This one works:
SELECT ItemName, ItemNo
FROM tblItems
WHERE (ItemNo In (200,250,333));
This one doesn't work:
SELECT ItemName, ItemNo
FROM tblItems
WHERE (ItemNo In ([Forms]![myForm]![myText]));
myText contains comma separated values, such as: 100,200,300
My form contains a command button that opens the query after values are
entered in the text box.
Thanks very much,
Emma