Add the following function to a module:
Function IncrementTextBox()
Dim ctlCurr As Control
Set ctlCurr = Screen.ActiveControl
If TypeOf ctlCurr Is TextBox Then
If Not IsNull(ctlCurr) Then
If IsNumeric(ctlCurr) Then
ctlCurr = ctlCurr + 0.5
End If
End If
End If
End Function
Set the On Click event for all of your text boxes to =IncrementTextBox()
(make sure you include both the = sign and the () at the end)
--
Doug Steele, Microsoft Access MVP
(No private e-mails, please)
dave said:
I want to be able to click a text box and have it add .5 each time I click
it . I've got about 40 boxes and would like to not recode for each textbox.
Any ideas?