Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Combo box row height?

Geek News

Combo box row height?
"Terry" <controlnetremove[ at ]insightbb.com> 11/21/2008 12:54:58 AM
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?



Re: Combo box row height?
"Dirk Goldgar" <dg[ at ]NOdataSPAMgnostics.com.invalid> 11/21/2008 2:00:09 AM
"Terry" <controlnetremove[ at ]insightbb.com> wrote in message
news:%23x01SP3SJHA.5364[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
>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;


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Re: Combo box row height?
"Arvin Meyer [MVP]" <arvinm[ at ]mvps.invalid> 11/21/2008 2:14:54 AM
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
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Terry" <controlnetremove[ at ]insightbb.com> wrote in message
news:%23x01SP3SJHA.5364[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
>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?
>
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net