Guest herewegoagain Posted September 26, 2002 Posted September 26, 2002 Does anyone see anything here that I am missing? For some reason it is not returning the results it is suppose to. sql2 = "SELECT * FROM STOCK WHERE ONHAND + ONORDER < RESERVE ORDER BY NUMBER" stock is table name onhand is field onorder is field reserve is field number is field and primary key. Please help thank you..... Quote
reboot Posted September 26, 2002 Posted September 26, 2002 NUMBER may be a reserved word. Put brackets around it. e.g. [NUMBER] Quote
Guest herewegoagain Posted September 26, 2002 Posted September 26, 2002 nope didnt work.....any other ideas? I cant beleive this it should be so simple. One piece of information that I didnt give before is that the fields are of float variety except for number. Quote
reboot Posted September 26, 2002 Posted September 26, 2002 Try telling us what it is or isn't doing. Error message? "not returning the results it is suppose to" isn't very enlightening. Quote
Guest herewegoagain Posted September 26, 2002 Posted September 26, 2002 sorry. it is not returning any results at all though I know that should not be the case. I know this is incorrect because I manually went in and looked through an excel formula to do the calculation to test the program results. Here is the code of that event procedure and again thank you for your help.... Quote
*Gurus* Derek Stone Posted September 26, 2002 *Gurus* Posted September 26, 2002 Might try chucking the formula in some parenthesis. Order of operations could be messing things up. This is just an uneducated guess. SELECT * FROM STOCK WHERE ((ONHAND + ONORDER) < RESERVE) ORDER BY NUMBER Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.