Hide combobox arrow. A better method (1 Viewer)

John Sh

Member
Local time
Tomorrow, 05:42
Joined
Feb 8, 2021
Messages
410
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.
 

MsAccessNL

Member
Local time
Today, 21:42
Joined
Aug 27, 2022
Messages
184
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:42
Joined
May 7, 2009
Messages
19,245
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.
 

cheekybuddha

AWF VIP
Local time
Today, 20:42
Joined
Jul 21, 2014
Messages
2,280
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

  • HideDropdown.accdb
    396 KB · Views: 85

MsAccessNL

Member
Local time
Today, 21:42
Joined
Aug 27, 2022
Messages
184
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.
 

Users who are viewing this thread

Top Bottom