Jimbo, this is a question I was going to post also. However I tried a few
things and had limited success with this process. If anyone else has any
better ideas, I would like to know also.
I created a blank button. In the Properties, I clicked on the event tab and
then located the OnClick property. I created an event procedure as follows:
Private Sub Command109_Click()
On Error GoTo Err_Command109_Click
[Feild to update] = [Field to update] + 1
Exit_Command109_Click:
Exit Sub
Err_Command109_Click:
MsgBox Err.Description
Resume Exit_Command109_Click
End Sub
This worked in the couple of tests that I conducted. I also suggest that if
your form is similar in function to mine, that you create another button that
allows you to minus the field value as you need.
Again, if anyone else has any better ways to handle this, I am interested
also.
Jeff
> What I am trying to do is create a simple button that will +1 to the value of
> a field.
> Say for instance, record 1 has field "pens" and value 10... i want a simple
> button that will change that to 11, then 12 if clicked again.
>
> Thanks in advance
Private Sub ButtonToIncrementPensField_Click()
Me.Pens = Me.Pens + 1
End Sub

Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000
JimboJones - 13 May 2007 21:24 GMT
Many thanks.. that works perfectly in 2007, thanks :)