Combo box row height?

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

I have a cbo box that I use to choose addresses for customers that own
rental property.

Some of the addresses have two lines, like

111 somewhere
apt12


Is the a way I can get the cbo dropdown to show both lines?
 
Terry said:
I have a cbo box that I use to choose addresses for customers that own
rental property.

Some of the addresses have two lines, like

111 somewhere
apt12


Is the a way I can get the cbo dropdown to show both lines?


Not with the native Access combo box. There may be a third-party control
that could do it, but I don't know of one.

What you could do is give your combo box a rowsource query that transforms
the address from two lines to one line that includes both the original
lines. I think you could use the Replace function to do this, replacing the
character sequence Chr(13) & Chr(10) with some other character(s) such as "
/ ". For example, your combo's rowsource could be something like this:

SELECT ID, Replace(Address, (13) & Chr(10), " / ") As Address2
FROM Addresses;
 
Not directly, but you can add a text box and set it equal to the column in
the combo like:

= cboAddresses.Column(1)

for the second column. You can also use the zoom box with either the
keyboard Shift+F2 or VBA code:

Sub cboAddresses_DblClick()
DoCmd.RunCmd acCmdZoomBox
End Sub
 
Back
Top