First method is probably the best. Shouldn't tire life always be >0 ? In your table for the tire life field type >0 in to the "Validation Rule" property. (Same on your form's field if it's already made. Now in the "Validation Text" you would write something like:
Tire life must always be greater than 0!
Other choice is the "Immediate If":
=IIf([TireCost]=0,0,[TireLife]/[TireCost])
you were so close, and Access can be so fussy. Gord
ghubbell@total.net
Easy -Thanks again. Ill take a look for a book - living in Germany doesnt let me browse Access books in English in a bookshop so Ill try ordering your recommendation.
Let say the if became more complex, I guess then Id have to go to some vba, where would this be on the Control of the text box or the control of the form and could one use something similar to the expression ? The books that I have seem mainly on the gui and database functions rather than the vba elements - because of the ease of programming I used to (and still do) write all my technical applications in clipper - with dos dying with the newer windows version - I guess I have to learn vba more.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.