Private Sub ROLLING_12_GP_AfterUpdate()
' if they backspace and leave "" or null thats ok
If Len(Nz(Me.ROLLING_12_GP, "")) = 0 Then
Exit Sub
End If
' temp take out the % (keypress does not allow) if they enter it
Me!ROLLING_12_GP = Replace([ROLLING_12_GP], "%", "")
' now add it back for
Me!ROLLING_12_GP = Me.ROLLING_12_GP.Value / 100 * 100 & "%"
' delete the % if they leave it
If Me!ROLLING_12_GP = "%" Then
Me!ROLLING_12_GPP = ""
End If
End Sub
Private Sub ROLLING_12_GP_KeyPress(KeyAscii As Integer)
Select Case True 'always your best friend
Case (KeyAscii > 47 And KeyAscii < 58)
Case (KeyAscii = 8)
Case (KeyAscii = 43)
Case (KeyAscii = 45)
Case (KeyAscii = 46)
Case Else
MsgBox ("You Must Enter Numbers Only!")
KeyAscii = 0
Exit Sub
End Select
KeyAscii = KeyAscii
End Sub
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.