N
NNlogistics
I have a text box that I want to format and then depending on another field,
start with a specific value and start the cursor right after.
So I choose a value on a combo box (M/C,Amex,visa or Discover) I choose M/C
so on input of the txtbox, I want it to start at the second character - in
this case after the 5. I tried several variations, this get me the closest
but the cursor starts before the 5?
Private Sub txtCCAccountNumber_Enter()
If Me.cmboCCType = "M/C" Then
Me.txtCCAccountNumber.InputMask = "0000\-0000\-0000\-0000"
Me.txtCCAccountNumber = "5"
Me.txtCCAccountNumber.SetFocus
Me.txtCCAccountNumber.SelStart = 2
start with a specific value and start the cursor right after.
So I choose a value on a combo box (M/C,Amex,visa or Discover) I choose M/C
so on input of the txtbox, I want it to start at the second character - in
this case after the 5. I tried several variations, this get me the closest
but the cursor starts before the 5?
Private Sub txtCCAccountNumber_Enter()
If Me.cmboCCType = "M/C" Then
Me.txtCCAccountNumber.InputMask = "0000\-0000\-0000\-0000"
Me.txtCCAccountNumber = "5"
Me.txtCCAccountNumber.SetFocus
Me.txtCCAccountNumber.SelStart = 2