Adding to a field

J

James

Can i place a button in a form to automatically add 1 or take 1 from a field.
E.G I have a field called Amount, this field always tends to go up or down.
Can i place a button next to it so that it does it with a mouse click rather
than typing it in?
 
A

Adam Milligan

In the button's onclick event put something like the following code

if not isnull(me.[yourfield]) then

me.[yourfield] = me.[yourfield] +1

end if

There might be some other error checking to do, but I think this is the gist
of it.
 
Top