473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Combo Box Row Source

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
10 2543
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dalan | last post by:
I have been searching the archives in an effort to discover how to derive a dual use of a single combo box - so far no go. I found the piece below which pretty much represents the usage. To...
1
by: Jeff Smith | last post by:
Hi This is a repost due to no responses Here's a problem I've encountered with Access 2003 which has got me to redesign how I get the row source in a second combo box using the first combo...
6
by: Ron L | last post by:
I have a dataset whose source is a SQL 2k stored procedure that I am trying to display in a datagrid. This datasource has 4 columns that I am interested in here, a text column and 3 value columns...
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
2
by: MLH | last post by:
I invoked the combo-box wizard today, telling it to use a 4-table union query as a row-source for the combo-box it was assisting me in building. The error I got was without number and stated,...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
1
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is...
2
by: Sid | last post by:
I need some help in setting up Access combo box. I am using three comboboxes in my form. Comb Box 1, Combo Box 2, Combo Box 3. The row source for each of the combo box is a seperate table. ...
0
by: Dawnyy | last post by:
I have a form which is bound to a dataset. I am filling the forms dataset on Form_Load event. On my form I have combo boxes which I am setting by running a stored procedure to return a datatable,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.