B
BFish via AccessMonster.com
Hello all,
I have two unbound comboboxes for record search on my form, each separate of
the other. One has formatting the other not. On focus of either one of
these controls I would like the control text highlighted as if the F2 key is
pressed to overwrite the previous search for easier user operation.
I believe I have exhausted everything I have been able to find in this
newsgroup, which has been absolutely wonderful for reference throughout this
build.
I have tried:
Me.Combo48.SelStart = 0
Me.Combo48.SelLength = Len(Me.Combo48.Text & vbNullString)
and many variations.
On each of the "got focus", "enter" and "click" events with no luck.
I have even tried the dreaded
SendKeys "{F2}", True
statement.
I thought possibly the issue was an unbound control, so I tested in a bound
combobox with same results.
The closest I have been is to use:
Me.Combo48 = ""
on the click event. But that of course clears the control right after the
update (which I would like the user to be able to see their entry if it is
not on the list) and with the formatted combobox if the user clicks into it,
the cursor will remain where it was clicked.
Is there a setting in Access I may have inadvertently turned off (as seems
others are able to make use of the first code) or am I just missing something
quite easy.
Maybe I just have to make do with the zero length string.
Thanks in advance,
Bill Fischer
I have two unbound comboboxes for record search on my form, each separate of
the other. One has formatting the other not. On focus of either one of
these controls I would like the control text highlighted as if the F2 key is
pressed to overwrite the previous search for easier user operation.
I believe I have exhausted everything I have been able to find in this
newsgroup, which has been absolutely wonderful for reference throughout this
build.
I have tried:
Me.Combo48.SelStart = 0
Me.Combo48.SelLength = Len(Me.Combo48.Text & vbNullString)
and many variations.
On each of the "got focus", "enter" and "click" events with no luck.
I have even tried the dreaded
SendKeys "{F2}", True
statement.
I thought possibly the issue was an unbound control, so I tested in a bound
combobox with same results.
The closest I have been is to use:
Me.Combo48 = ""
on the click event. But that of course clears the control right after the
update (which I would like the user to be able to see their entry if it is
not on the list) and with the formatted combobox if the user clicks into it,
the cursor will remain where it was clicked.
Is there a setting in Access I may have inadvertently turned off (as seems
others are able to make use of the first code) or am I just missing something
quite easy.
Maybe I just have to make do with the zero length string.
Thanks in advance,
Bill Fischer