473,830 Members | 2,045 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2585
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 "Columnwidt h" property
in Access help for full details.

Rgds,

Mark

"Bob Darlington" <bo*@dpcmanAX.c om.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
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.c om.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
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********@sne t.net> wrote in message
news:dw******** *********@newss vr17.news.prodi gy.com...
Simply change the "Caption" property for the label to whatever you wish it
to be . . .
"Bob Darlington" <bo*@dpcmanAX.c om.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
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*********@nt lworld.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 "Columnwidt h" property
in Access help for full details.

Rgds,

Mark

"Bob Darlington" <bo*@dpcmanAX.c om.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
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.c om.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
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******** ************@tw ister01.bloor.i s.net.cable.rog ers.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.c om.au> wrote in message
news:41******** *************** @news.optusnet. com.au...
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.c om.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
qTenantSelec t "

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.I NDIVIDUAL.NET.. .
On Mon, 30 Aug 2004 20:24:16 +1000, "Bob Darlington"
<bo*@dpcmanAX.c om.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
qTenantSelec t "

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.c om.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.c om.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
>qTenantSelec t "
>
>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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2388
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 summarize: The cboKeyword box on the frmCustomer looks up Keywords from a separate table that have just a list of keywords and a KeyID number. The bound column is tied to the autonumber and is saved in the frmCustomer table. The keywords appear in the...
1
4153
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 box as a filter. In Access 2002 and earlier the row source for the second combo was "SELECT Field1, Field2 etc, FROM MyTable WHERE Field3 =
6
3771
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 corresponding to permissions to certain data classes. I want to put the permission values in combo boxes in the grid and instead of displaying the numeric values, have the combo box display a string that corresponds to the numeric value (i.e. No...
3
3661
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" through "Phase 10" (there are 10 Phases I want to sort from) Once the phase has been selected a second combo box would populate.
2
1875
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, "Data cannot be retrieved from the source you have selected. You must select a different table or query to continue in the wizard." just after I chose the query named qryAuthsOwnersAddnlOwnersLienholders4OneCar. Have any of you ever seen that error...
4
64664
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 determines the available options in the other. TERMINOLOGY Row Source: The table/query from which the Combo Box or List Box gets its values. Note: There are other types of row sources that can be used but for simplicity we will stick with Tables...
1
3108
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 ultimately driven by the results of two combo boxes: 1st combo box on main form that filters desired results for 2d combo box on sub form Main form: no record source. Has an unbound combo box. name: frminput combo name: cboAccounts The row...
2
3147
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. Table 1 acts as row source for Combo Box 1 Table 2 acts as row source for Combo Box 2 However for combobox 3, I was trying to use 4 different tables as row source. I am trying to set up a criteria such that row source for comb
0
1968
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, which I then assign to the datasource. Some of my combo box datasources depend on values in other fields to limit the options. For example, I have a sales rep list that is limited by the customer selected in the customers combo box. And...
0
9791
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10771
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10202
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6950
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3958
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.