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
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE