if select on text field

Traden

Registered User.
Local time
Today, 17:04
Joined
Mar 7, 2003
Messages
32
Hi out there,

i do have a problem and hope that some of you out there might help me. I am not good at coding VBA thats why i do not know how to solve.

Problem:
i do have a from for material issue. I want to check out if there is enough material in store to fit that issue. So i do have a tB to enter. After you entered the number, i want acess to look up if there is enough material. I wrote a query for the current stock and want to enter that query as validation rule for the Tb. The problem is that the query onlny works when i have an issue for that spesific material, caused on my DB design. I want to implement an if claus, that he only runs the query, subtracts the issue and check if there is already an issue in, if not i want him to run a different query, with checks different. it should be something like that

if(issue=0)
if(query1-issue)=<0 then ... (display not valid)
else
execute
else
if
query 2-issue<0 then display...
else
execute..

sounds difficult to understand, i hope u get what i mean

thanks in advance

Traden:D
 
I suspect you are having a problem with null values. If you have not had an issue, your query based on the issues table will come back with a null. Any calculation with a null as one of the values will fail.

You need to convert the null value to a zero, so that your maths still works. Look up the Nz() function in Access help. If you use this, you can use the same query without worrying if the value is a null, a zero or a positive value.
 
thanks a lot, that should be the easier way to fix that:D :D ;)
 

Users who are viewing this thread

Back
Top Bottom