Rod,
I would bind and use the Autonumber fields in the related tables. That's typically why we have autonumber primary key fields. They make great link master fields for joins to other tables.
Duane Hookom, MVP
MS Access
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 6 Jan 2015 15:11:53 -0800
Subject: [MS_AccessPros] Re: Issue with two identical set of controls
Thanks for the responses. One field (citybusinesscode) was at text field that was changed to a number which had the format property set. That fields displays as a number. However, the other field (businesscode) which is still showing the leading zero does not have a format define. If I use the formated field in citybusinesscode the associated text field display blank unless the number being represented has no leading zero.
I think it would be nice to show the numbers as three digits (just for appearances). The two tables used to support fields are define as follows:
for businesscode
lngBusinessCodeID AutoNumber
lngBusinessCode Number long integer no format
strBusinessTitle Text 255
for citybusinesscode
I would bind and use the Autonumber fields in the related tables. That's typically why we have autonumber primary key fields. They make great link master fields for joins to other tables.
Duane Hookom, MVP
MS Access
To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 6 Jan 2015 15:11:53 -0800
Subject: [MS_AccessPros] Re: Issue with two identical set of controls
Thanks for the responses. One field (citybusinesscode) was at text field that was changed to a number which had the format property set. That fields displays as a number. However, the other field (businesscode) which is still showing the leading zero does not have a format define. If I use the formated field in citybusinesscode the associated text field display blank unless the number being represented has no leading zero.
I think it would be nice to show the numbers as three digits (just for appearances). The two tables used to support fields are define as follows:
for businesscode
lngBusinessCodeID AutoNumber
lngBusinessCode Number long integer no format
strBusinessTitle Text 255
for citybusinesscode
lngCityBusinessCodeID AutoNumber
lngCityBusinessCode Number long integer no format (did have format 000 once)
strCityBusinessTitle Text 255
on the format the fields consist of a combo-box and text box, following associated with businesscode
bound column = 2
combo-box source
SELECT tblBusinessCode.lngBusinessCodeID, tblBusinessCode.lngBusinessCode,
tblBusinessCode.strBusinessTitle FROM tblBusinessCode;
textbox source
=[Cbo_BusinessClass].[Column](2)
citybusinesscode is very similar
bound column = 2
combo-box source
SELECT tblCityBusinessCode.lngCityBusinessCodeID, tblCityBusinessCode.lngCityBusinessCode,
tblCItyBusinessCode.strCityBusinessTitle FROM tblCityBusinessCode;
textbox source
=[Cbo_CityBusinessClass].[Column](2)
Hopefully I explained the everything. So far I have not be able to identify the issue of the display.
Rod
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
lngCityBusinessCode Number long integer no format (did have format 000 once)
strCityBusinessTitle Text 255
on the format the fields consist of a combo-box and text box, following associated with businesscode
bound column = 2
combo-box source
SELECT tblBusinessCode.lngBusinessCodeID, tblBusinessCode.lngBusinessCode,
tblBusinessCode.strBusinessTitle FROM tblBusinessCode;
textbox source
=[Cbo_BusinessClass].[Column](2)
citybusinesscode is very similar
bound column = 2
combo-box source
SELECT tblCityBusinessCode.lngCityBusinessCodeID, tblCityBusinessCode.lngCityBusinessCode,
tblCItyBusinessCode.strCityBusinessTitle FROM tblCityBusinessCode;
textbox source
=[Cbo_CityBusinessClass].[Column](2)
Hopefully I explained the everything. So far I have not be able to identify the issue of the display.
Rod
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Rod-
It sounds like the field at one time was Text but now is a number. It will display with a leading zero if there's a Format property defined of "000".
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
It sounds like the field at one time was Text but now is a number. It will display with a leading zero if there's a Format property defined of "000".
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
On Jan 6, 2015, at 5:14 AM, Duane Hookom duanehookom@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Rod,
Please provide the data types of the bound column and the related field. Row sources with data sources might be ideal information.
Duane Hookom, MVP
MS Access
________________________________
> To: MS_Access_Professionals@yahoogroups.com
> From: MS_Access_Professionals@yahoogroups.com
> Date: Mon, 5 Jan 2015 19:09:24 -0800
> Subject: [MS_AccessPros] Issue with two identical set of controls
>
>
>
> I have create a combo box and text box pair. The combo box is used to
> select a value (business code) and the text box will display the
> associated title of the code.
>
> i.e. 014 Retail Sale
>
> a second pair is used for city business code
>
> i.e. 28 Retail Sale
>
> both pairs are setup identical. The problem is none of the values have
> leading zero ( in the table list) but the business code always
> displays as the 3 digit number with leading zero. The city business
> never displays the leading zero. Not sure if I am missing something.
> Would like the display to be consistent. Originally the city business
> codes were defined as 3 digit numbers with leading zero but when
> selected the text would never appear if there was a leading zero.
>
> The combo box use a query to define selection list. The query returns
> 3 columns. The second column is the value and the 3 column is the
> text.
>
> The text boxes are defined by "=[cbo_businesscode].[column](2)" and
>
> "=[cbo_citybusinesscode].[column](2)" respectfully.
>
> Currently both source table number have no leading zeros.
>
> Any ideas?
> Rod
>
>
------------------------------------
------------------------------------
------------------------------------
Yahoo Groups Links
__._,_.___
Posted by: Duane Hookom <duanehookom@hotmail.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar