S
steve a
Hi
I've got a slight problem with a command button,
I want it to add a character into a combo box as you would with a key stroke
on the keyboard.
the code i use at the moment does this, however it doesn't auto complete,
but it does when i use the keyboard!
the code i'm using for the button's are:
Private Sub cmdKeyQ_Click()
lngCurPos = mlngSelStart
With Me.combo
.SetFocus
If CapLockOn = True Then
Me.combo = Me.combo & Chr(81)
Else
Me.combo = Me.combo & Chr(113)
End If
.SelStart = lngCurPos + 1
End With
lngLength = Len(Me.combo)
SetCurMoveOptions lngCurPos, lngLength
End Sub
i used to use "q" but changed this to use the chr () funciton thinking this
might be the problem but unfortunately the same result.
many thanks
I've got a slight problem with a command button,
I want it to add a character into a combo box as you would with a key stroke
on the keyboard.
the code i use at the moment does this, however it doesn't auto complete,
but it does when i use the keyboard!
the code i'm using for the button's are:
Private Sub cmdKeyQ_Click()
lngCurPos = mlngSelStart
With Me.combo
.SetFocus
If CapLockOn = True Then
Me.combo = Me.combo & Chr(81)
Else
Me.combo = Me.combo & Chr(113)
End If
.SelStart = lngCurPos + 1
End With
lngLength = Len(Me.combo)
SetCurMoveOptions lngCurPos, lngLength
End Sub
i used to use "q" but changed this to use the chr () funciton thinking this
might be the problem but unfortunately the same result.
many thanks