Hi!
VAL(STR(0))
Sometimes STR() can return "0" and sometimes "0.00". VAL() then produce different field types. This difference sometimes cause the error, because View field definition in database is different then the result of the view query. When you open database, database is updated automatically by a new structure of the view (that can cause conflicts in multi-user anvironment and should be *very* strongly avoided).
Change it to the val(STR(0,2,0)), though I do not see reasons to use val(str()) - just specify "0 AS qty", unless VAL() return different result.
HTH.
>My form runs this view first and works every time:
>
>
>SELECT Btstorge.store_type, Btstorge.location, SPACE(8) AS co_id,;
> SPACE(5) AS info_type, CTOD("12/12/12") AS finan_dt, Btstorge.max,;
> Btstorge.nbr_boxes, Btstorge.user_id, Btstorge.added, Btstorge.modified;
> FROM bt!Storage Btstorge;
> WHERE Btstorge.store_type = "B";
> AND Btstorge.nbr_boxes = 0
>
>
>Immediately after, it runs this view and often gives me the error View definition has been changed, but not all the time:
>
>SELECT Btstorge.store_type, Btstorge.location, SPACE(5) AS info_type,;
> CTOD("12/12/12") AS finan_dt, Btstorge.nbr_boxes, Btstorge.max,;
> VAL(STR(0)) AS qty;
> FROM bt!Storage Btstorge;
> WHERE Btstorge.store_type = "S";
> AND Btstorge.max > Btstorge.nbr_boxes;
> ORDER BY Btstorge.location
>
>
>I found that if I put Open Database BT before the problem view, it works each time. Can anyone give me a clue as to what in the second view is different that would cause this issue and why the first one always works?
>
>Thanks!
>
>Sally
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.