SteveL13
asked on
Double-click a field that has a currency number in it and select the entire field
A few days ago an expert provided a solution so that if I double-click in a text box, the entire contents of the text box get highlighted, not just the work I d/c on. Here is the code as provided:
However, I just discovered that if I d/c on the field and it is a currency field, it does not highlight the entire field. How can I fix this so it does highlight the entire field?
Private Sub txtName_KeyPress(KeyAscii As Integer)
On Error GoTo Err_txtSymbol_KeyPress
Const vbKeyNone As Integer = 0
If KeyAscii = vbKeySpace Then
KeyAscii = vbKeyNone
DoCmd.Beep
End If
If Trim(Replace(Me!txtName.Text, "_", "")) = "" Then
Me!txtName.SelStart = 0
End If
Exit_txtName_KeyPress:
Exit Sub
Err_txtName_KeyPress:
MsgBox "Error Number: " & Err.Number & vbCrLf & "Error Description: " & Err.Description & vbCrLf & "Error Source: " & Err.Source
Resume Exit_txtName_KeyPress
End Sub
However, I just discovered that if I d/c on the field and it is a currency field, it does not highlight the entire field. How can I fix this so it does highlight the entire field?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You are absolutely correct. I was confused.
Oh.
Have a nice weekend!
Have a nice weekend!
ASKER