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?
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
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.