change default msg in Status Bar

  • Thread starter Thread starter tina
  • Start date Start date
T

tina

hi folks.

i have an unbound textbox in a form with an expression for ControlSource, as

=[ControlName].[Column](1)

to show the 2nd-column value from a hidden combo box on the form. i have the
textbox locked, but enabled so that the user can highlight /copy the value
s/he wants to.

i have a string entered in the control's StatusBarText property, but if the
user should happen to press a key while in the control, my string is
overridden with the following default message, as

Control can't be edited; it's bound to the expression
'[ControlName].[Column](1)'.

the message is correct, of course, but i'd prefer that my user not see it.
is it possible to intercept that message programmatically, and either show
nothing ("" or Null), continue to show the string from the StatusBarText
property, or show a custom Status Bar text instead?

tia,
tina
 
posting here is like going to the doctor - sometimes it's therapeutic just
to "walk through the door". <g>
i got the following to work just now, as

Private Sub MyTextboxName_KeyDown(KeyCode As Integer, Shift As Integer)

If Shift = 2 And KeyCode = 67 Then
'the user is pressing Ctrl+c to copy, so allow it
Else
KeyCode = 0
End If

End Sub

if there is a drawback to the solution, or a better solution out there, i'd
appreciate all comments! :)
 
Back
Top