By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,139 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,139 IT Pros & Developers. It's quick & easy.

Combo Box Row Source

P: n/a
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to 'Shop
Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save width)
as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks like
I'm wrong .... yet again.

Can anyone help?

--
Bob Darlington
Brisbane
Nov 13 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Bob,
As far as I know, the heading is just a label and can be renamed as you
please. It displays 'Shop Number' because whatever you call it AS, the
source is still 'Shop Number'.
The data displayed as the combo box detail should be the raw data with no
headings at all. If you are not happy with the column widths, you can change
them in the combo box properties. The values in "Column widths" on the
"Format" tab are the values you need to change. See "Columnwidth" property
in Access help for full details.

Rgds,

Mark

"Bob Darlington" <bo*@dpcmanAX.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to 'Shop Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save width) as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks like I'm wrong .... yet again.

Can anyone help?

--
Bob Darlington
Brisbane

Nov 13 '05 #2

P: n/a
Simply change the "Caption" property for the label to whatever you wish it
to be . . .
"Bob Darlington" <bo*@dpcmanAX.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to 'Shop Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save width) as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks like I'm wrong .... yet again.

Can anyone help?

--
Bob Darlington
Brisbane

Nov 13 '05 #3

P: n/a
It is not a label. The caption property is in the table design, and is used
throughtout the app as intended.
But for this particular combo, I want to change it to something shorter -
hence 'As'.

--
Bob Darlington
Brisbane
"Ed Sturges" <es********@snet.net> wrote in message
news:dw*****************@newssvr17.news.prodigy.co m...
Simply change the "Caption" property for the label to whatever you wish it
to be . . .
"Bob Darlington" <bo*@dpcmanAX.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to

'Shop
Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save

width)
as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks

like
I'm wrong .... yet again.

Can anyone help?

--
Bob Darlington
Brisbane


Nov 13 '05 #4

P: n/a
Mark,
Thanks for the reply.
The headings in a combo will pickup the caption property from the table
design, just as a query will.
What I want to know, is how to rename the heading to what I want for this
particular combo.
I am assuming that a different formatting is required as a result of using
the caption property in the table.
But what is the correct formatting? Or is it impossible?
As I said in my post, I want to save column width, hence my question. To
have a column width of 3cm to hold a 2 digit number looks ridiculous, hence
my post.
The caption used in table design is used throughout my app, and suits 95% of
the time, so I don't want to change it.

--
Bob Darlington
Brisbane
"Mark" <ma*********@ntlworld.com> wrote in message
news:Zd***************@newsfe2-gui.ntli.net...
Bob,
As far as I know, the heading is just a label and can be renamed as you please. It displays 'Shop Number' because whatever you call it AS, the
source is still 'Shop Number'.
The data displayed as the combo box detail should be the raw data with no
headings at all. If you are not happy with the column widths, you can change them in the combo box properties. The values in "Column widths" on the
"Format" tab are the values you need to change. See "Columnwidth" property
in Access help for full details.

Rgds,

Mark

"Bob Darlington" <bo*@dpcmanAX.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to

'Shop
Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save

width)
as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks

like
I'm wrong .... yet again.

Can anyone help?

--
Bob Darlington
Brisbane


Nov 13 '05 #5

P: n/a
If I understand this correctly, you have a table with a field called
ShopNum. That field has a caption = "Shop Number". You are including the
data from this field in a Combo Box. You would like to have the Combo box to
display a different caption than the one that is specified in the table
properties.
OK so far?

As I remember you can not override the table property value using a SQL
alias. If you need to display different Captions in certain circumstances,
you need to remove the 'Caption' property from the table.

I haven't tested this but, you might be able to override it by selecting the
values that will supply the combo box from a stored Query. That query would
have the field alias that you want to use.

HTH

yamafopa!

"Bob Darlington" <bo*@dpcmanAX.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to 'Shop Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save width) as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks like I'm wrong .... yet again.

Can anyone help?

--
Bob Darlington
Brisbane

Nov 13 '05 #6

P: n/a
Thanks for the reply.
You seem to be right. I can't do it without removing the Caption from the
table.
Tried your suggestion using a stored query, but gives the same result.

--
Bob Darlington
Brisbane
"Yamafopa" <ya******@yahoo.com> wrote in message
news:ww********************@twister01.bloor.is.net .cable.rogers.com...
If I understand this correctly, you have a table with a field called
ShopNum. That field has a caption = "Shop Number". You are including the
data from this field in a Combo Box. You would like to have the Combo box to display a different caption than the one that is specified in the table
properties.
OK so far?

As I remember you can not override the table property value using a SQL
alias. If you need to display different Captions in certain circumstances,
you need to remove the 'Caption' property from the table.

I haven't tested this but, you might be able to override it by selecting the values that will supply the combo box from a stored Query. That query would have the field alias that you want to use.

HTH

yamafopa!

"Bob Darlington" <bo*@dpcmanAX.com.au> wrote in message
news:41***********************@news.optusnet.com.a u...
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to

'Shop
Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save

width)
as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks

like
I'm wrong .... yet again.

Can anyone help?

--
Bob Darlington
Brisbane


Nov 13 '05 #7

P: n/a
On Mon, 30 Aug 2004 20:24:16 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.au> wrote:
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to 'Shop
Number' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save width)
as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks like
I'm wrong .... yet again.

Can anyone help?


Horrible, obnoxious, please don't do this suggestion to follow:

Add another field to the query which has the same source as Shop
Number, but either leave its caption blank or set it to Shop. Then
use that one, rather than Shop Number for the source of your combo
box.

I told you it was a bad idea. ;-)

mike

Nov 13 '05 #8

P: n/a
Mike,
In fact it was so horible that even I had tried it. And it doesn't work.
I think I'm stuck with the fact that once I've used the caption property in
the table, I can't then call it something else.
Thanks for replying though.

--
Bob Darlington
Brisbane
"Mike Preston" <mb**************@pacbell.net> wrote in message
news:41****************@news.INDIVIDUAL.NET...
On Mon, 30 Aug 2004 20:24:16 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.au> wrote:
I am using the following SQL as a RowSource for a combo box on a form.

"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
qTenantSelect "

The field 'ShopNum' is a text field and has a caption property set to 'ShopNumber' in the table design.
In the combo box though, I want to use 'Shop' as the heading (to save width)as shown in the SQL above.
But the combo shows 'Shop Number' as a heading in form view.

I thought that the 'As Shop' would have done what I wanted, but looks likeI'm wrong .... yet again.

Can anyone help?


Horrible, obnoxious, please don't do this suggestion to follow:

Add another field to the query which has the same source as Shop
Number, but either leave its caption blank or set it to Shop. Then
use that one, rather than Shop Number for the source of your combo
box.

I told you it was a bad idea. ;-)

mike

Nov 13 '05 #9

P: n/a
On Tue, 31 Aug 2004 17:16:47 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.au> wrote:
Mike,
In fact it was so horible that even I had tried it. And it doesn't work.
I think I'm stuck with the fact that once I've used the caption property in
the table, I can't then call it something else.
Thanks for replying though.
Let me rephrase. Add another field to the table, not the query. Then
use that field as the source of your field in the query.

I told you it was terrible. ;-)

mike

--
Bob Darlington
Brisbane
"Mike Preston" <mb**************@pacbell.net> wrote in message
news:41****************@news.INDIVIDUAL.NET...
On Mon, 30 Aug 2004 20:24:16 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.au> wrote:
>I am using the following SQL as a RowSource for a combo box on a form.
>
>"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
>qTenantSelect "
>
>The field 'ShopNum' is a text field and has a caption property set to'Shop >Number' in the table design.
>In the combo box though, I want to use 'Shop' as the heading (to savewidth) >as shown in the SQL above.
>But the combo shows 'Shop Number' as a heading in form view.
>
>I thought that the 'As Shop' would have done what I wanted, but lookslike >I'm wrong .... yet again.
>
>Can anyone help?


Horrible, obnoxious, please don't do this suggestion to follow:

Add another field to the query which has the same source as Shop
Number, but either leave its caption blank or set it to Shop. Then
use that one, rather than Shop Number for the source of your combo
box.

I told you it was a bad idea. ;-)

mike



Nov 13 '05 #10

P: n/a
Thanks Mike,
That makes more sense. I've bitten the bullet now and removed the caption
from the table and edited my queries which referred to it.
I suppose it wasn't such a big deal, but I hate these things getting the
better of me.

--
Bob Darlington
Brisbane
"Mike Preston" <mb**************@pacbell.net> wrote in message
news:41****************@news.INDIVIDUAL.NET...
On Tue, 31 Aug 2004 17:16:47 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.au> wrote:
Mike,
In fact it was so horible that even I had tried it. And it doesn't work.
I think I'm stuck with the fact that once I've used the caption property inthe table, I can't then call it something else.
Thanks for replying though.


Let me rephrase. Add another field to the table, not the query. Then
use that field as the source of your field in the query.

I told you it was terrible. ;-)

mike

--
Bob Darlington
Brisbane
"Mike Preston" <mb**************@pacbell.net> wrote in message
news:41****************@news.INDIVIDUAL.NET...
On Mon, 30 Aug 2004 20:24:16 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.au> wrote:

>I am using the following SQL as a RowSource for a combo box on a form.
>
>"SELECT LAN, TenantName as [Tenant Name], ShopNum as [Shop] FROM
>qTenantSelect "
>
>The field 'ShopNum' is a text field and has a caption property set to

'Shop
>Number' in the table design.
>In the combo box though, I want to use 'Shop' as the heading (to save

width)
>as shown in the SQL above.
>But the combo shows 'Shop Number' as a heading in form view.
>
>I thought that the 'As Shop' would have done what I wanted, but looks

like
>I'm wrong .... yet again.
>
>Can anyone help?

Horrible, obnoxious, please don't do this suggestion to follow:

Add another field to the query which has the same source as Shop
Number, but either leave its caption blank or set it to Shop. Then
use that one, rather than Shop Number for the source of your combo
box.

I told you it was a bad idea. ;-)

mike


Nov 13 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.