OK, I thought Ttat worked, but it didn't. I went to a backup version,
and only a couple of queries had this issue. So I did as you suggested,
and was able to make them work. However, when I made the change that
started things off last time, (I thought) the same thing happened.
I have this query.
SELECT item_warehouse_link_history.change_id,
item_warehouse_link_history.company_id,
item_warehouse_link_history.warehouse_id,
item_warehouse_link_history.item_id,
DateValue(item_warehouse_link_history!date) AS [date],
item_warehouse_link_history.old_qty,
item_warehouse_link_history.new_cost,
item_warehouse_link_history.location_id,
item_warehouse_link_history.old_cost,
item_warehouse_link_history.change_qty,
item_warehouse_link_history.user_id,
item_warehouse_link_history.new_qty, item_warehouse_link_history.script,
item_warehouse_link_history.get, item_warehouse_link_history.post,
item_warehouse_link_history.session, item_warehouse_link_history.error,
item_warehouse_link_history.item_cost,
item_warehouse_link_history.onfloor_qty,
item_warehouse_link_history.post_process,
item_warehouse_link_history.post_table,
item_warehouse_link_history.post_field,
item_warehouse_link_history.post_id AS postid,
CLng(item_warehouse_link_history!post_id) AS post_id,
item_warehouse_link_history.old_cost_qty,
item_warehouse_link_history.new_cost_qty
FROM item_warehouse_link_history
WHERE (((item_warehouse_link_history.post_id)>"0") AND
((DateValue([date]))>=nz([Forms]![DateForm]![ChosenDate],#1/1/2005#) And
(DateValue([date]))<=nz([Forms]![DateForm]![ChosenDate],#1/1/2099#)));
I make a single change in the WHERE statement to:
WHERE (((item_warehouse_link_history.post_id)>"0") AND
((item_warehouse_link_history.date)>=nz([Forms]![DateForm]![ChosenDate],#1/1/2005#)
And
(item_warehouse_link_history.date)<=nz([Forms]![DateForm]![ChosenDate],#1/1/2099#)));
And now all the queries that are based on it crash. To be clear, Access
closes down with an error.
The query above does not crash the system. Just those that rely on it,
which is most of the queries.