Hide combobox arrow. A better method

John Sh

Active member
Local time
Today, 22:42
Joined
Feb 8, 2021
Messages
571
This topic has seem much discussion with textboxes covering the combobox and one or the other being invisible or not.
If all you want to do is have a control bound to a query and you don't want the arrow, simply make a little text box to cover the arrow and set the border to transparent. Your combobox will work as normal and the arrow will never be seen.
The downside is, of course, that you won't be able to get the dropdown other than with code.
 
Use a listbox or subform beneath the text box, listbox.left =text-box.left . You can show the listbox with the on click event or on double click. You can use one listbox for all search textboxes, just set position and rowsource. I even have code to use this system on a continous form.
 
The downside is, of course, that you won't be able to get the dropdown other than with code.
you can use Alt-Down to cause your combo to dropdown.
 
Here is a better method.

You use a textbox to cover the whole of the combobox, not just the arrow.

Set its ControlSource to: =[NameOfCombo].[Column](1)

Set its Locked property= True

Set its Back Style = Normal

Set its TabStop = No

Right-click the control in design view and in Position -> Bring to front

In its Enter event:
Code:
Private Sub YourTextboxe_Enter()
  Me.YourCombo.SetFocus
End Sub

It will appear without arrows for all rows in your continuous form, until you enter the combo. Then only the combo in the current row will show the arrow.

See attached:
 

Attachments

How does that work? Surely that would increase the detail height?
The continuous form must be a subform, the listox is placed on the main form, adjusting its position to current control on the subform.
 
@cheekybuddha
This works like a charm, and most important (for me) is that right click filtering of the combo box still works.
Exactly what I was looking for.
Gold star to you for example database.
 

Users who are viewing this thread

Back
Top Bottom