Display Employee ID as cognate in Textbox

M

MackBlale

I have generated a 4 digit employee ID that displays in a textbox. I have
two combo boxes that delineate which operations center and which team the
employee is handled by. I want to display the employee number as a construct
of these three pieces of information. For example the Employee 1234XY would
work for Center X Team Y. The Teams and Centers Each have unique Alpha
Codes. i.e, A, B, C, D. Teams likewise have been assinged a code, i.e., Team
101-A, 102-B. This information is alread contained in the table I use for
the cascading combo box query. I've tried to provide as much information as
possible.
Thanks,
Mack
 
B

BruceM

If Team and Center are stored values you can just concatenate them. In the
Control Source of a text box:
=[EmployeeID] & [Team] &


In a query:
ExtendedNumber: [EmployeeID] & [Team] &


I don't see from your description where 101-A, etc. fits into this.​
 
M

MackBlale

Bruce,
Thanks. I think it is how I have the tables set up. There are 5 Centers:
B, C, I, W, and M. The Combo box selections are MND-B, MND-C, MNC-I, MNF-W,
and MEDCOM respectively. The first letter after the number will identify the
center so... 1234C would be an employee under MND-C. Each center has teams
101, 102, 103, etc. Team 101s corresponding letter would be A, 102 would be
B, and so on. Therefor 1234CA would be an employee assigned to MND-C Team
101. I hope this helps to explain what I'm trying to do. I think I need
another column in my table...

Mack

BruceM said:
If Team and Center are stored values you can just concatenate them. In the
Control Source of a text box:
=[EmployeeID] & [Team] &


In a query:
ExtendedNumber: [EmployeeID] & [Team] &


I don't see from your description where 101-A, etc. fits into this.

MackBlale said:
I have generated a 4 digit employee ID that displays in a textbox. I have
two combo boxes that delineate which operations center and which team the
employee is handled by. I want to display the employee number as a
construct
of these three pieces of information. For example the Employee 1234XY
would
work for Center X Team Y. The Teams and Centers Each have unique Alpha
Codes. i.e, A, B, C, D. Teams likewise have been assinged a code, i.e.,
Team
101-A, 102-B. This information is alread contained in the table I use for
the cascading combo box query. I've tried to provide as much information
as
possible.
Thanks,
Mack
 
B

BruceM

As you have it set up the rightmost letter for each center is the one you
want to append to the EmployeeID. You could have this in a query:
ExtendedNumber: [EmployeeID] & Right(
,1)

For the next part you should be able to use the Chr function. Chr(65) is A,
Chr(66) is B, etc. To turn 101 into the letter A or 102 into B, etc.,
subtract 36:
Chr([Team] - 36)

This will work as long as you don't go above 126.

If [Team] is a text field you may need to convert it to a number:
Chr(Val([Team])-36)

I don't think this will be necessary, so try it first without using Val.

Putting it all together:
ExtendedNumber: [EmployeeID] & Right(
,1) & Chr([Team] - 36)

You could do this as the Control Source of a text box, but I find it more
convenient to use a query when the expression starts to get more complex.
Use the query as the record source, and bind a text box to ExtendedNumber.

MackBlale said:
Bruce,
Thanks. I think it is how I have the tables set up. There are 5 Centers:
B, C, I, W, and M. The Combo box selections are MND-B, MND-C, MNC-I,
MNF-W,
and MEDCOM respectively. The first letter after the number will identify
the
center so... 1234C would be an employee under MND-C. Each center has
teams
101, 102, 103, etc. Team 101s corresponding letter would be A, 102 would
be
B, and so on. Therefor 1234CA would be an employee assigned to MND-C Team
101. I hope this helps to explain what I'm trying to do. I think I need
another column in my table...

Mack

BruceM said:
If Team and Center are stored values you can just concatenate them. In
the
Control Source of a text box:
=[EmployeeID] & [Team] &


In a query:
ExtendedNumber: [EmployeeID] & [Team] &


I don't see from your description where 101-A, etc. fits into this.

MackBlale said:
I have generated a 4 digit employee ID that displays in a textbox. I
have
two combo boxes that delineate which operations center and which team
the
employee is handled by. I want to display the employee number as a
construct
of these three pieces of information. For example the Employee 1234XY
would
work for Center X Team Y. The Teams and Centers Each have unique Alpha
Codes. i.e, A, B, C, D. Teams likewise have been assinged a code,
i.e.,
Team
101-A, 102-B. This information is alread contained in the table I use
for
the cascading combo box query. I've tried to provide as much
information
as
possible.
Thanks,
Mack
 
M

MackBlale

Bruce,
While experimenting I simply added another column to my tables. Now in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and TmDesigNtr. The
designator field holds values A-Z for the Teams and B, C, I, M, and W for the
Centers. I tried the unbound textbox = method but did not work for me.
Also, previously I had the format set to "0000" because I need the number to
display as four digits. This is not working with the cognate. Still
plugging away,

Mack
BruceM said:
As you have it set up the rightmost letter for each center is the one you
want to append to the EmployeeID. You could have this in a query:
ExtendedNumber: [EmployeeID] & Right(
,1)

For the next part you should be able to use the Chr function. Chr(65) is A,
Chr(66) is B, etc. To turn 101 into the letter A or 102 into B, etc.,
subtract 36:
Chr([Team] - 36)

This will work as long as you don't go above 126.

If [Team] is a text field you may need to convert it to a number:
Chr(Val([Team])-36)

I don't think this will be necessary, so try it first without using Val.

Putting it all together:
ExtendedNumber: [EmployeeID] & Right(
,1) & Chr([Team] - 36)

You could do this as the Control Source of a text box, but I find it more
convenient to use a query when the expression starts to get more complex.
Use the query as the record source, and bind a text box to ExtendedNumber.

MackBlale said:
Bruce,
Thanks. I think it is how I have the tables set up. There are 5 Centers:
B, C, I, W, and M. The Combo box selections are MND-B, MND-C, MNC-I,
MNF-W,
and MEDCOM respectively. The first letter after the number will identify
the
center so... 1234C would be an employee under MND-C. Each center has
teams
101, 102, 103, etc. Team 101s corresponding letter would be A, 102 would
be
B, and so on. Therefor 1234CA would be an employee assigned to MND-C Team
101. I hope this helps to explain what I'm trying to do. I think I need
another column in my table...

Mack

BruceM said:
If Team and Center are stored values you can just concatenate them. In
the
Control Source of a text box:
=[EmployeeID] & [Team] &


In a query:
ExtendedNumber: [EmployeeID] & [Team] &


I don't see from your description where 101-A, etc. fits into this.

I have generated a 4 digit employee ID that displays in a textbox. I
have
two combo boxes that delineate which operations center and which team
the
employee is handled by. I want to display the employee number as a
construct
of these three pieces of information. For example the Employee 1234XY
would
work for Center X Team Y. The Teams and Centers Each have unique Alpha
Codes. i.e, A, B, C, D. Teams likewise have been assinged a code,
i.e.,
Team
101-A, 102-B. This information is alread contained in the table I use
for
the cascading combo box query. I've tried to provide as much
information
as
possible.
Thanks,
Mack

 
J

John W. Vinson

Bruce,
While experimenting I simply added another column to my tables. Now in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and TmDesigNtr. The
designator field holds values A-Z for the Teams and B, C, I, M, and W for the
Centers. I tried the unbound textbox = method but did not work for me.
Also, previously I had the format set to "0000" because I need the number to
display as four digits. This is not working with the cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're trying (in
at least two places) to store multiple pieces of information in one field.
This violates the basic principle that fields should be "atomic" - storing
only one chunk of information. It's always easier to concatenate three or four
values together into a string than it is to tease them apart; for example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr, "0000")
 
M

MackBlale

Bruce & John,
Thanks for all your help. The way I came up with the Handling Ctr/Tm values
was by choosing one of three ways to make my cascading combo boxes. Each
field currently only holds one value, I just need the displayed number to be
a concatenated value. My problem is that what this number is depends on what
is chosen in the cascading combo boxes. I can send a copy of the database if
that helps. Sorry if I'm making this difficult.

Mack

John W. Vinson said:
Bruce,
While experimenting I simply added another column to my tables. Now in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and TmDesigNtr. The
designator field holds values A-Z for the Teams and B, C, I, M, and W for the
Centers. I tried the unbound textbox = method but did not work for me.
Also, previously I had the format set to "0000" because I need the number to
display as four digits. This is not working with the cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're trying (in
at least two places) to store multiple pieces of information in one field.
This violates the basic principle that fields should be "atomic" - storing
only one chunk of information. It's always easier to concatenate three or four
values together into a string than it is to tease them apart; for example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr, "0000")
 
B

BruceM

When describing an error or unexpected result you need to be specific. You
wrote "I tried the unbound textbox = method but did not work for me". In
what way did it not work? What exactly did you place in the Control Source
for the unbound text box? If the information is as you described earlier my
suggestion will work. You can test each element of the Control Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions using the
ampersand. If not, describe the result produced by the expression(s) that
did not work as expected.

Cascading combo boxes are generally taken to mean something like this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only cities
and towns in that state or province. I don't see where you have this sort
of situation. If you do, where exactly does it occur?

MackBlale said:
Bruce & John,
Thanks for all your help. The way I came up with the Handling Ctr/Tm
values
was by choosing one of three ways to make my cascading combo boxes. Each
field currently only holds one value, I just need the displayed number to
be
a concatenated value. My problem is that what this number is depends on
what
is chosen in the cascading combo boxes. I can send a copy of the database
if
that helps. Sorry if I'm making this difficult.

Mack

John W. Vinson said:
Bruce,
While experimenting I simply added another column to my tables. Now in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M, and W
for the
Centers. I tried the unbound textbox = method but did not work for me.
Also, previously I had the format set to "0000" because I need the
number to
display as four digits. This is not working with the cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're trying
(in
at least two places) to store multiple pieces of information in one
field.
This violates the basic principle that fields should be "atomic" -
storing
only one chunk of information. It's always easier to concatenate three or
four
values together into a string than it is to tease them apart; for example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr, "0000")
 
M

MackBlale

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which center is
selected the second combo box HandlingTm displays a choice of teams, i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a button and
then never changes as it is the key index. In the form after the ClientID is
generated and the HandlingCtr and Team are selected in the combo box I want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for the
current record being looked at. Final product should look like this: 1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields. I will
respond again with exact errors and any code that was written. Merry
Christmas!

Mack

BruceM said:
When describing an error or unexpected result you need to be specific. You
wrote "I tried the unbound textbox = method but did not work for me". In
what way did it not work? What exactly did you place in the Control Source
for the unbound text box? If the information is as you described earlier my
suggestion will work. You can test each element of the Control Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions using the
ampersand. If not, describe the result produced by the expression(s) that
did not work as expected.

Cascading combo boxes are generally taken to mean something like this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only cities
and towns in that state or province. I don't see where you have this sort
of situation. If you do, where exactly does it occur?

MackBlale said:
Bruce & John,
Thanks for all your help. The way I came up with the Handling Ctr/Tm
values
was by choosing one of three ways to make my cascading combo boxes. Each
field currently only holds one value, I just need the displayed number to
be
a concatenated value. My problem is that what this number is depends on
what
is chosen in the cascading combo boxes. I can send a copy of the database
if
that helps. Sorry if I'm making this difficult.

Mack

John W. Vinson said:
On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables. Now in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M, and W
for the
Centers. I tried the unbound textbox = method but did not work for me.
Also, previously I had the format set to "0000" because I need the
number to
display as four digits. This is not working with the cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're trying
(in
at least two places) to store multiple pieces of information in one
field.
This violates the basic principle that fields should be "atomic" -
storing
only one chunk of information. It's always easier to concatenate three or
four
values together into a string than it is to tease them apart; for example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr, "0000")
 
B

BruceM

The code would be helpful. It is by chance that I am still monitoring this
thread. I usually stop after a couple of weeks at the most. I have to say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about creating a
ClientID. Does that mean you are creating a new Client record, for a client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is its After
Update event (which is where you would modify the Row Source for the Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that information is
stored.

MackBlale said:
Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which center
is
selected the second combo box HandlingTm displays a choice of teams, i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a button
and
then never changes as it is the key index. In the form after the ClientID
is
generated and the HandlingCtr and Team are selected in the combo box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for the
current record being looked at. Final product should look like this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields. I
will
respond again with exact errors and any code that was written. Merry
Christmas!

Mack

BruceM said:
When describing an error or unexpected result you need to be specific.
You
wrote "I tried the unbound textbox = method but did not work for me". In
what way did it not work? What exactly did you place in the Control
Source
for the unbound text box? If the information is as you described earlier
my
suggestion will work. You can test each element of the Control Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions using the
ampersand. If not, describe the result produced by the expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only cities
and towns in that state or province. I don't see where you have this
sort
of situation. If you do, where exactly does it occur?

MackBlale said:
Bruce & John,
Thanks for all your help. The way I came up with the Handling Ctr/Tm
values
was by choosing one of three ways to make my cascading combo boxes.
Each
field currently only holds one value, I just need the displayed number
to
be
a concatenated value. My problem is that what this number is depends on
what
is chosen in the cascading combo boxes. I can send a copy of the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables. Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M, and W
for the
Centers. I tried the unbound textbox = method but did not work for
me.
Also, previously I had the format set to "0000" because I need the
number to
display as four digits. This is not working with the cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're
trying
(in
at least two places) to store multiple pieces of information in one
field.
This violates the basic principle that fields should be "atomic" -
storing
only one chunk of information. It's always easier to concatenate three
or
four
values together into a string than it is to tease them apart; for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr, "0000")
 
M

MackBlale

Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


BruceM said:
The code would be helpful. It is by chance that I am still monitoring this
thread. I usually stop after a couple of weeks at the most. I have to say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about creating a
ClientID. Does that mean you are creating a new Client record, for a client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is its After
Update event (which is where you would modify the Row Source for the Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that information is
stored.

MackBlale said:
Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which center
is
selected the second combo box HandlingTm displays a choice of teams, i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a button
and
then never changes as it is the key index. In the form after the ClientID
is
generated and the HandlingCtr and Team are selected in the combo box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for the
current record being looked at. Final product should look like this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields. I
will
respond again with exact errors and any code that was written. Merry
Christmas!

Mack

BruceM said:
When describing an error or unexpected result you need to be specific.
You
wrote "I tried the unbound textbox = method but did not work for me". In
what way did it not work? What exactly did you place in the Control
Source
for the unbound text box? If the information is as you described earlier
my
suggestion will work. You can test each element of the Control Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions using the
ampersand. If not, describe the result produced by the expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only cities
and towns in that state or province. I don't see where you have this
sort
of situation. If you do, where exactly does it occur?

Bruce & John,
Thanks for all your help. The way I came up with the Handling Ctr/Tm
values
was by choosing one of three ways to make my cascading combo boxes.
Each
field currently only holds one value, I just need the displayed number
to
be
a concatenated value. My problem is that what this number is depends on
what
is chosen in the cascading combo boxes. I can send a copy of the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables. Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M, and W
for the
Centers. I tried the unbound textbox = method but did not work for
me.
Also, previously I had the format set to "0000" because I need the
number to
display as four digits. This is not working with the cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're
trying
(in
at least two places) to store multiple pieces of information in one
field.
This violates the basic principle that fields should be "atomic" -
storing
only one chunk of information. It's always easier to concatenate three
or
four
values together into a string than it is to tease them apart; for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr, "0000")

 
B

BruceM

The Column Count is the number of columns in a combo box or list box Row
Source query or table. It can also be used with a value list Row Source,
but that doesn't seem to apply here. The Bound Column is the one Access
"sees" when it looks at the combo box. With this Row Source you have three
columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet, Format
tab) of 3; otherwise HandlingTeam is all that will be available in the combo
box. If the Bound Column (Data tab) is 1 (first column), Access will "see"
Handling Team when it looks at the combo box unless you specify otherwise.
If the combo box is bound to a field, the bound column is the data that will
be stored in the field.

The Column Widths (Format tab) is the widths of the columns when you click
the combo box drop-down arrow. If you do not specify otherwise the first
column in the Row Source will be the only visible data, and it will be the
width of the combo box. If you have something like CompanyID, CompanyName
as the Row Source, you probably intend for your users to select the
CompanyName, but you want to store the CompanyID, which will stay the same
if the company changes its name. In that case the Column Count is 2, the
Column Widths are 0";1.5" (or whatever for the second column), and the Bound
Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call the combo
box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam. It may not
matter in this case, but in some situations it does, and in all cases you
know exactly to what you are referring in the code. It also makes it easier
when you post a question.


MackBlale said:
Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


BruceM said:
The code would be helpful. It is by chance that I am still monitoring
this
thread. I usually stop after a couple of weeks at the most. I have to
say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for a
client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is its
After
Update event (which is where you would modify the Row Source for the Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that information
is
stored.

MackBlale said:
Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which
center
is
selected the second combo box HandlingTm displays a choice of teams,
i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a
button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for the
current record being looked at. Final product should look like this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields. I
will
respond again with exact errors and any code that was written. Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be specific.
You
wrote "I tried the unbound textbox = method but did not work for me".
In
what way did it not work? What exactly did you place in the Control
Source
for the unbound text box? If the information is as you described
earlier
my
suggestion will work. You can test each element of the Control Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions using
the
ampersand. If not, describe the result produced by the expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only
cities
and towns in that state or province. I don't see where you have this
sort
of situation. If you do, where exactly does it occur?

Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo boxes.
Each
field currently only holds one value, I just need the displayed
number
to
be
a concatenated value. My problem is that what this number is depends
on
what
is chosen in the cascading combo boxes. I can send a copy of the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables.
Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M,
and W
for the
Centers. I tried the unbound textbox = method but did not work
for
me.
Also, previously I had the format set to "0000" because I need the
number to
display as four digits. This is not working with the cognate.
Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're
trying
(in
at least two places) to store multiple pieces of information in one
field.
This violates the basic principle that fields should be "atomic" -
storing
only one chunk of information. It's always easier to concatenate
three
or
four
values together into a string than it is to tease them apart; for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")

 
M

MackBlale

Bruce,
I am digesting this and will return to the forum as soon as I have time. I
need some sleep!

BruceM said:
The Column Count is the number of columns in a combo box or list box Row
Source query or table. It can also be used with a value list Row Source,
but that doesn't seem to apply here. The Bound Column is the one Access
"sees" when it looks at the combo box. With this Row Source you have
three columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet,
Format tab) of 3; otherwise HandlingTeam is all that will be available in
the combo box. If the Bound Column (Data tab) is 1 (first column),
Access will "see" Handling Team when it looks at the combo box unless you
specify otherwise. If the combo box is bound to a field, the bound column
is the data that will be stored in the field.

The Column Widths (Format tab) is the widths of the columns when you click
the combo box drop-down arrow. If you do not specify otherwise the first
column in the Row Source will be the only visible data, and it will be the
width of the combo box. If you have something like CompanyID, CompanyName
as the Row Source, you probably intend for your users to select the
CompanyName, but you want to store the CompanyID, which will stay the same
if the company changes its name. In that case the Column Count is 2, the
Column Widths are 0";1.5" (or whatever for the second column), and the
Bound Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call the
combo box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam. It may
not matter in this case, but in some situations it does, and in all cases
you know exactly to what you are referring in the code. It also makes it
easier when you post a question.


MackBlale said:
Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


BruceM said:
The code would be helpful. It is by chance that I am still monitoring
this
thread. I usually stop after a couple of weeks at the most. I have to
say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for a
client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is its
After
Update event (which is where you would modify the Row Source for the
Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column
Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that information
is
stored.

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which
center
is
selected the second combo box HandlingTm displays a choice of teams,
i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a
button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for the
current record being looked at. Final product should look like this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields. I
will
respond again with exact errors and any code that was written. Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be
specific.
You
wrote "I tried the unbound textbox = method but did not work for me".
In
what way did it not work? What exactly did you place in the Control
Source
for the unbound text box? If the information is as you described
earlier
my
suggestion will work. You can test each element of the Control
Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions using
the
ampersand. If not, describe the result produced by the expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like
this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only
cities
and towns in that state or province. I don't see where you have this
sort
of situation. If you do, where exactly does it occur?

Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo boxes.
Each
field currently only holds one value, I just need the displayed
number
to
be
a concatenated value. My problem is that what this number is
depends on
what
is chosen in the cascading combo boxes. I can send a copy of the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables.
Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M,
and W
for the
Centers. I tried the unbound textbox = method but did not work
for
me.
Also, previously I had the format set to "0000" because I need
the
number to
display as four digits. This is not working with the cognate.
Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're
trying
(in
at least two places) to store multiple pieces of information in
one
field.
This violates the basic principle that fields should be "atomic" -
storing
only one chunk of information. It's always easier to concatenate
three
or
four
values together into a string than it is to tease them apart; for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")

 
M

MackBlale

Ok, I've recovered somewhat.
The user may choose the HandlingCtr which then in turn allows him to select
the HandlingTeam. These are stored values. The list is ordered by the ID
Team which is an autonumber column. There is another column in the qry
table named "TmDesgNtr" this is the column that stores the two letter
Identifier of the team. The team name may change but the designator never
will. From your reponse I guess I'm storing the wrong infomation. The user
should be able to pick the Handling Team, ie, "A401" and the TmDesigNtr "CB"
should be stored. Then I should be able to cocantenate the Client ID &
TmDesigNtr.

Combo.61 is the Hanling Team Combobox which I have renamed to cboHandlingTm.
If I'm on the right track just Holler!

Mack

BruceM said:
The Column Count is the number of columns in a combo box or list box Row
Source query or table. It can also be used with a value list Row Source,
but that doesn't seem to apply here. The Bound Column is the one Access
"sees" when it looks at the combo box. With this Row Source you have
three columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet,
Format tab) of 3; otherwise HandlingTeam is all that will be available in
the combo box. If the Bound Column (Data tab) is 1 (first column),
Access will "see" Handling Team when it looks at the combo box unless you
specify otherwise. If the combo box is bound to a field, the bound column
is the data that will be stored in the field.

The Column Widths (Format tab) is the widths of the columns when you click
the combo box drop-down arrow. If you do not specify otherwise the first
column in the Row Source will be the only visible data, and it will be the
width of the combo box. If you have something like CompanyID, CompanyName
as the Row Source, you probably intend for your users to select the
CompanyName, but you want to store the CompanyID, which will stay the same
if the company changes its name. In that case the Column Count is 2, the
Column Widths are 0";1.5" (or whatever for the second column), and the
Bound Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call the
combo box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam. It may
not matter in this case, but in some situations it does, and in all cases
you know exactly to what you are referring in the code. It also makes it
easier when you post a question.


MackBlale said:
Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


BruceM said:
The code would be helpful. It is by chance that I am still monitoring
this
thread. I usually stop after a couple of weeks at the most. I have to
say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for a
client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is its
After
Update event (which is where you would modify the Row Source for the
Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column
Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that information
is
stored.

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which
center
is
selected the second combo box HandlingTm displays a choice of teams,
i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a
button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for the
current record being looked at. Final product should look like this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields. I
will
respond again with exact errors and any code that was written. Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be
specific.
You
wrote "I tried the unbound textbox = method but did not work for me".
In
what way did it not work? What exactly did you place in the Control
Source
for the unbound text box? If the information is as you described
earlier
my
suggestion will work. You can test each element of the Control
Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions using
the
ampersand. If not, describe the result produced by the expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like
this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only
cities
and towns in that state or province. I don't see where you have this
sort
of situation. If you do, where exactly does it occur?

Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo boxes.
Each
field currently only holds one value, I just need the displayed
number
to
be
a concatenated value. My problem is that what this number is
depends on
what
is chosen in the cascading combo boxes. I can send a copy of the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables.
Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M,
and W
for the
Centers. I tried the unbound textbox = method but did not work
for
me.
Also, previously I had the format set to "0000" because I need
the
number to
display as four digits. This is not working with the cognate.
Still
plugging away,

PMFJI but... it looks like the root of your problem is that you're
trying
(in
at least two places) to store multiple pieces of information in
one
field.
This violates the basic principle that fields should be "atomic" -
storing
only one chunk of information. It's always easier to concatenate
three
or
four
values together into a string than it is to tease them apart; for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")

 
B

BruceM

You are not limited to concatenating the combo box record source data. You
can refer to other columns thus:
=cboHandlingTm.Column(1)

The column counting is zero-based in this case, so Column(1) is actually the
second column. Column(0) is the first column. If you leave out Column()
you will get the bound column.

It makes good sense to store the value that will not change. It does not
have to be the displayed column. Any values from the combo box row source
can be displayed.

If you need more information, please be clear, remembering that I cannot see
you database. For instance, you refer to "the list", which I assume is the
HandlingTeam row source, but I am not sure. For a combo box include
information about Row Source, Record Source, Bound Column, Column Count, and
Column Widths. BTW, why order by the autonumber?

TmDesigNtr does not seem to be part of the Row Source for cboHandlingTeam
that you posted earlier. Has the Row Source changed?

MackBlale said:
Ok, I've recovered somewhat.
The user may choose the HandlingCtr which then in turn allows him to
select the HandlingTeam. These are stored values. The list is ordered by
the ID Team which is an autonumber column. There is another column in the
qry table named "TmDesgNtr" this is the column that stores the two letter
Identifier of the team. The team name may change but the designator never
will. From your reponse I guess I'm storing the wrong infomation. The
user should be able to pick the Handling Team, ie, "A401" and the
TmDesigNtr "CB" should be stored. Then I should be able to cocantenate
the Client ID & TmDesigNtr.

Combo.61 is the Hanling Team Combobox which I have renamed to
cboHandlingTm. If I'm on the right track just Holler!

Mack

BruceM said:
The Column Count is the number of columns in a combo box or list box Row
Source query or table. It can also be used with a value list Row Source,
but that doesn't seem to apply here. The Bound Column is the one Access
"sees" when it looks at the combo box. With this Row Source you have
three columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet,
Format tab) of 3; otherwise HandlingTeam is all that will be available in
the combo box. If the Bound Column (Data tab) is 1 (first column),
Access will "see" Handling Team when it looks at the combo box unless you
specify otherwise. If the combo box is bound to a field, the bound column
is the data that will be stored in the field.

The Column Widths (Format tab) is the widths of the columns when you
click the combo box drop-down arrow. If you do not specify otherwise the
first column in the Row Source will be the only visible data, and it will
be the width of the combo box. If you have something like CompanyID,
CompanyName as the Row Source, you probably intend for your users to
select the CompanyName, but you want to store the CompanyID, which will
stay the same if the company changes its name. In that case the Column
Count is 2, the Column Widths are 0";1.5" (or whatever for the second
column), and the Bound Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call the
combo box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam. It may
not matter in this case, but in some situations it does, and in all cases
you know exactly to what you are referring in the code. It also makes it
easier when you post a question.


MackBlale said:
Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


:

The code would be helpful. It is by chance that I am still monitoring
this
thread. I usually stop after a couple of weeks at the most. I have to
say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for a
client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is its
After
Update event (which is where you would modify the Row Source for the
Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column
Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that information
is
stored.

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which
center
is
selected the second combo box HandlingTm displays a choice of teams,
i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a
button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo box
I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for
the
current record being looked at. Final product should look like this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields.
I
will
respond again with exact errors and any code that was written. Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be
specific.
You
wrote "I tried the unbound textbox = method but did not work for
me". In
what way did it not work? What exactly did you place in the Control
Source
for the unbound text box? If the information is as you described
earlier
my
suggestion will work. You can test each element of the Control
Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions
using the
ampersand. If not, describe the result produced by the
expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like
this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only
cities
and towns in that state or province. I don't see where you have
this
sort
of situation. If you do, where exactly does it occur?

Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo
boxes.
Each
field currently only holds one value, I just need the displayed
number
to
be
a concatenated value. My problem is that what this number is
depends on
what
is chosen in the cascading combo boxes. I can send a copy of the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables.
Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr, and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M,
and W
for the
Centers. I tried the unbound textbox = method but did not work
for
me.
Also, previously I had the format set to "0000" because I need
the
number to
display as four digits. This is not working with the cognate.
Still
plugging away,

PMFJI but... it looks like the root of your problem is that
you're
trying
(in
at least two places) to store multiple pieces of information in
one
field.
This violates the basic principle that fields should be
"atomic" -
storing
only one chunk of information. It's always easier to concatenate
three
or
four
values together into a string than it is to tease them apart; for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")


 
M

MackBlale

Bruce,
The 2 letter TmDesigNtr I want to display was added as a field to the
tblHandlingTm. My Combo boxes are Cascading and what the user selects is
what is stored in the tblEmployees. The TmDesigNtr is part of the
tblHandlingTm. This table was created strictly to make the casacading combo
boxes work.

The control source for cboHandlingTeam is HandlingTeam; the Row Source Is
qryMFT (Multi-functional Team). The column count is 1; the column width is
blank. Information from this cboHandlingTeam is stored in tblEmployees
field HandlingTeam.

The Teams are ordered by auto number because I followed the instructions
that were given to me in a forum like this. I could order them by the Team
number, but I hadn't thought of it until you mentioned it.

Quite simply, I thought, the user would see and choose a Handling Team, ie
A401 from the cboHandlingTeam. This information is stored. Then I want to
display the 2 letter identifier (CB) from tblHandlingTM.TmDesigNtr
associated with that team along with the tblEmployees.ClientID.

Obviously I'm lost and I appreciate your patience.

Mack
BruceM said:
You are not limited to concatenating the combo box record source data.
You can refer to other columns thus:
=cboHandlingTm.Column(1)

The column counting is zero-based in this case, so Column(1) is actually
the second column. Column(0) is the first column. If you leave out
Column() you will get the bound column.

It makes good sense to store the value that will not change. It does not
have to be the displayed column. Any values from the combo box row source
can be displayed.

If you need more information, please be clear, remembering that I cannot
see you database. For instance, you refer to "the list", which I assume
is the HandlingTeam row source, but I am not sure. For a combo box
include information about Row Source, Record Source, Bound Column, Column
Count, and Column Widths. BTW, why order by the autonumber?

TmDesigNtr does not seem to be part of the Row Source for cboHandlingTeam
that you posted earlier. Has the Row Source changed?

MackBlale said:
Ok, I've recovered somewhat.
The user may choose the HandlingCtr which then in turn allows him to
select the HandlingTeam. These are stored values. The list is ordered
by the ID Team which is an autonumber column. There is another column in
the qry table named "TmDesgNtr" this is the column that stores the two
letter Identifier of the team. The team name may change but the
designator never will. From your reponse I guess I'm storing the wrong
infomation. The user should be able to pick the Handling Team, ie,
"A401" and the TmDesigNtr "CB" should be stored. Then I should be able
to cocantenate the Client ID & TmDesigNtr.

Combo.61 is the Hanling Team Combobox which I have renamed to
cboHandlingTm. If I'm on the right track just Holler!

Mack

BruceM said:
The Column Count is the number of columns in a combo box or list box Row
Source query or table. It can also be used with a value list Row
Source, but that doesn't seem to apply here. The Bound Column is the
one Access "sees" when it looks at the combo box. With this Row Source
you have three columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet,
Format tab) of 3; otherwise HandlingTeam is all that will be available
in the combo box. If the Bound Column (Data tab) is 1 (first column),
Access will "see" Handling Team when it looks at the combo box unless
you specify otherwise. If the combo box is bound to a field, the bound
column is the data that will be stored in the field.

The Column Widths (Format tab) is the widths of the columns when you
click the combo box drop-down arrow. If you do not specify otherwise
the first column in the Row Source will be the only visible data, and it
will be the width of the combo box. If you have something like
CompanyID, CompanyName as the Row Source, you probably intend for your
users to select the CompanyName, but you want to store the CompanyID,
which will stay the same if the company changes its name. In that case
the Column Count is 2, the Column Widths are 0";1.5" (or whatever for
the second column), and the Bound Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call the
combo box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam. It
may not matter in this case, but in some situations it does, and in all
cases you know exactly to what you are referring in the code. It also
makes it easier when you post a question.


Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


:

The code would be helpful. It is by chance that I am still monitoring
this
thread. I usually stop after a couple of weeks at the most. I have
to say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for a
client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is its
After
Update event (which is where you would modify the Row Source for the
Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column
Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that
information is
stored.

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which
center
is
selected the second combo box HandlingTm displays a choice of teams,
i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a
button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo box
I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for
the
current record being looked at. Final product should look like
this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields.
I
will
respond again with exact errors and any code that was written.
Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be
specific.
You
wrote "I tried the unbound textbox = method but did not work for
me". In
what way did it not work? What exactly did you place in the
Control
Source
for the unbound text box? If the information is as you described
earlier
my
suggestion will work. You can test each element of the Control
Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions
using the
ampersand. If not, describe the result produced by the
expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like
this:
There is a combo box for selecting a state or province. After that
selection is made, the City combo box is requeried to display only
cities
and towns in that state or province. I don't see where you have
this
sort
of situation. If you do, where exactly does it occur?

Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo
boxes.
Each
field currently only holds one value, I just need the displayed
number
to
be
a concatenated value. My problem is that what this number is
depends on
what
is chosen in the cascading combo boxes. I can send a copy of the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my tables.
Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr,
and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I, M,
and W
for the
Centers. I tried the unbound textbox = method but did not work
for
me.
Also, previously I had the format set to "0000" because I need
the
number to
display as four digits. This is not working with the cognate.
Still
plugging away,

PMFJI but... it looks like the root of your problem is that
you're
trying
(in
at least two places) to store multiple pieces of information in
one
field.
This violates the basic principle that fields should be
"atomic" -
storing
only one chunk of information. It's always easier to concatenate
three
or
four
values together into a string than it is to tease them apart;
for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")


 
B

BruceM

A combo box is cascading, as the term is generally used, if the drop-down
list is modified based on data elsewhere.

I need to ask you to back up a bit here and fill me in on the details.

What is the basic structure of the table to which the form is bound? Sample
fields are sufficient; I don't need to know all of the fields.

What is the Row Source of cboHandlingCtr? Please post the SQL. If the Row
Source is "SELECT ...", that is the SQL. If the Row Source is a named
query, open the query in design view, click View >> SQL, and copy what you
see there. If it is a table, what are the fields?

What is the After Update event of cboHandlingCtr?

Is this still the SQL for cboHandlingTeam?
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=
[Forms]![LNARecord]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam


MackBlale said:
Bruce,
The 2 letter TmDesigNtr I want to display was added as a field to the
tblHandlingTm. My Combo boxes are Cascading and what the user selects is
what is stored in the tblEmployees. The TmDesigNtr is part of the
tblHandlingTm. This table was created strictly to make the casacading
combo boxes work.

The control source for cboHandlingTeam is HandlingTeam; the Row Source Is
qryMFT (Multi-functional Team). The column count is 1; the column width
is blank. Information from this cboHandlingTeam is stored in tblEmployees
field HandlingTeam.

The Teams are ordered by auto number because I followed the instructions
that were given to me in a forum like this. I could order them by the
Team number, but I hadn't thought of it until you mentioned it.

Quite simply, I thought, the user would see and choose a Handling Team, ie
A401 from the cboHandlingTeam. This information is stored. Then I want
to display the 2 letter identifier (CB) from tblHandlingTM.TmDesigNtr
associated with that team along with the tblEmployees.ClientID.

Obviously I'm lost and I appreciate your patience.

Mack
BruceM said:
You are not limited to concatenating the combo box record source data.
You can refer to other columns thus:
=cboHandlingTm.Column(1)

The column counting is zero-based in this case, so Column(1) is actually
the second column. Column(0) is the first column. If you leave out
Column() you will get the bound column.

It makes good sense to store the value that will not change. It does not
have to be the displayed column. Any values from the combo box row
source can be displayed.

If you need more information, please be clear, remembering that I cannot
see you database. For instance, you refer to "the list", which I assume
is the HandlingTeam row source, but I am not sure. For a combo box
include information about Row Source, Record Source, Bound Column, Column
Count, and Column Widths. BTW, why order by the autonumber?

TmDesigNtr does not seem to be part of the Row Source for cboHandlingTeam
that you posted earlier. Has the Row Source changed?

MackBlale said:
Ok, I've recovered somewhat.
The user may choose the HandlingCtr which then in turn allows him to
select the HandlingTeam. These are stored values. The list is ordered
by the ID Team which is an autonumber column. There is another column
in the qry table named "TmDesgNtr" this is the column that stores the
two letter Identifier of the team. The team name may change but the
designator never will. From your reponse I guess I'm storing the wrong
infomation. The user should be able to pick the Handling Team, ie,
"A401" and the TmDesigNtr "CB" should be stored. Then I should be able
to cocantenate the Client ID & TmDesigNtr.

Combo.61 is the Hanling Team Combobox which I have renamed to
cboHandlingTm. If I'm on the right track just Holler!

Mack

The Column Count is the number of columns in a combo box or list box
Row Source query or table. It can also be used with a value list Row
Source, but that doesn't seem to apply here. The Bound Column is the
one Access "sees" when it looks at the combo box. With this Row Source
you have three columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet,
Format tab) of 3; otherwise HandlingTeam is all that will be available
in the combo box. If the Bound Column (Data tab) is 1 (first column),
Access will "see" Handling Team when it looks at the combo box unless
you specify otherwise. If the combo box is bound to a field, the bound
column is the data that will be stored in the field.

The Column Widths (Format tab) is the widths of the columns when you
click the combo box drop-down arrow. If you do not specify otherwise
the first column in the Row Source will be the only visible data, and
it will be the width of the combo box. If you have something like
CompanyID, CompanyName as the Row Source, you probably intend for your
users to select the CompanyName, but you want to store the CompanyID,
which will stay the same if the company changes its name. In that case
the Column Count is 2, the Column Widths are 0";1.5" (or whatever for
the second column), and the Bound Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call the
combo box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam. It
may not matter in this case, but in some situations it does, and in all
cases you know exactly to what you are referring in the code. It also
makes it easier when you post a question.


Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


:

The code would be helpful. It is by chance that I am still
monitoring this
thread. I usually stop after a couple of weeks at the most. I have
to say
I did not spend much time trying to sort out the previous part of the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for a
client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is
its After
Update event (which is where you would modify the Row Source for the
Team
combo box)? What is the Column Count, and which is the Bound Column?
What is the Row Source for the Team combo box? What is the Column
Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that
information is
stored.

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on which
center
is
selected the second combo box HandlingTm displays a choice of
teams, i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a
button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo
box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for
the
current record being looked at. Final product should look like
this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being fields.
I
will
respond again with exact errors and any code that was written.
Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be
specific.
You
wrote "I tried the unbound textbox = method but did not work for
me". In
what way did it not work? What exactly did you place in the
Control
Source
for the unbound text box? If the information is as you described
earlier
my
suggestion will work. You can test each element of the Control
Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions
using the
ampersand. If not, describe the result produced by the
expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like
this:
There is a combo box for selecting a state or province. After
that
selection is made, the City combo box is requeried to display only
cities
and towns in that state or province. I don't see where you have
this
sort
of situation. If you do, where exactly does it occur?

Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo
boxes.
Each
field currently only holds one value, I just need the displayed
number
to
be
a concatenated value. My problem is that what this number is
depends on
what
is chosen in the cascading combo boxes. I can send a copy of
the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my
tables. Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr,
and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I,
M, and W
for the
Centers. I tried the unbound textbox = method but did not
work for
me.
Also, previously I had the format set to "0000" because I need
the
number to
display as four digits. This is not working with the cognate.
Still
plugging away,

PMFJI but... it looks like the root of your problem is that
you're
trying
(in
at least two places) to store multiple pieces of information in
one
field.
This violates the basic principle that fields should be
"atomic" -
storing
only one chunk of information. It's always easier to
concatenate three
or
four
values together into a string than it is to tease them apart;
for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")


 
M

MackBlale

Bruce,
Details it is:

What is the basic structure of the table to which the form is bound?
FirstName, LastName, ClientID, PrimaryEmail, AddressStreet, Address City.

What is the Row Source of cboHandlingCtr? Please post the SQL.
qryHandlingCtr:
SELECT tblHandlingTeam.IDHandlingCtr, tblHandlingTeam.HandlingTeam,
tblHandlingTeam.IDTeam
FROM tblHandlingTeam
WHERE (((TblHandlingCtr.HandlingCtr)=[Forms]![LNA Record]![HandlingCtr]))
ORDER BY TblHandlingCtr.HandlingTeam;
What is the After Update event of cboHandlingCtr?
Private Sub HandlingCenter_AfterUpdate()
Me.CboHandlingTeam.Requery
End Sub

Is this still the SQL for cboHandlingTeam?
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=
[Forms]![LNARecord]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam
YES, this is correct All that I have done thus far is rename the combo box
and add the TmDesigNtr Field to tblHandlingTeam.

Thanks.

BruceM said:
A combo box is cascading, as the term is generally used, if the drop-down
list is modified based on data elsewhere.

I need to ask you to back up a bit here and fill me in on the details.

What is the basic structure of the table to which the form is bound?
Sample fields are sufficient; I don't need to know all of the fields.

What is the Row Source of cboHandlingCtr? Please post the SQL. If the
Row Source is "SELECT ...", that is the SQL. If the Row Source is a named
query, open the query in design view, click View >> SQL, and copy what you
see there. If it is a table, what are the fields?

What is the After Update event of cboHandlingCtr?

Is this still the SQL for cboHandlingTeam?
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=
[Forms]![LNARecord]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam


MackBlale said:
Bruce,
The 2 letter TmDesigNtr I want to display was added as a field to the
tblHandlingTm. My Combo boxes are Cascading and what the user selects is
what is stored in the tblEmployees. The TmDesigNtr is part of the
tblHandlingTm. This table was created strictly to make the casacading
combo boxes work.

The control source for cboHandlingTeam is HandlingTeam; the Row Source Is
qryMFT (Multi-functional Team). The column count is 1; the column width
is blank. Information from this cboHandlingTeam is stored in
tblEmployees field HandlingTeam.

The Teams are ordered by auto number because I followed the instructions
that were given to me in a forum like this. I could order them by the
Team number, but I hadn't thought of it until you mentioned it.

Quite simply, I thought, the user would see and choose a Handling Team,
ie A401 from the cboHandlingTeam. This information is stored. Then I
want to display the 2 letter identifier (CB) from
tblHandlingTM.TmDesigNtr associated with that team along with the
tblEmployees.ClientID.

Obviously I'm lost and I appreciate your patience.

Mack
BruceM said:
You are not limited to concatenating the combo box record source data.
You can refer to other columns thus:
=cboHandlingTm.Column(1)

The column counting is zero-based in this case, so Column(1) is actually
the second column. Column(0) is the first column. If you leave out
Column() you will get the bound column.

It makes good sense to store the value that will not change. It does
not have to be the displayed column. Any values from the combo box row
source can be displayed.

If you need more information, please be clear, remembering that I cannot
see you database. For instance, you refer to "the list", which I assume
is the HandlingTeam row source, but I am not sure. For a combo box
include information about Row Source, Record Source, Bound Column,
Column Count, and Column Widths. BTW, why order by the autonumber?

TmDesigNtr does not seem to be part of the Row Source for
cboHandlingTeam that you posted earlier. Has the Row Source changed?

Ok, I've recovered somewhat.
The user may choose the HandlingCtr which then in turn allows him to
select the HandlingTeam. These are stored values. The list is ordered
by the ID Team which is an autonumber column. There is another column
in the qry table named "TmDesgNtr" this is the column that stores the
two letter Identifier of the team. The team name may change but the
designator never will. From your reponse I guess I'm storing the wrong
infomation. The user should be able to pick the Handling Team, ie,
"A401" and the TmDesigNtr "CB" should be stored. Then I should be able
to cocantenate the Client ID & TmDesigNtr.

Combo.61 is the Hanling Team Combobox which I have renamed to
cboHandlingTm. If I'm on the right track just Holler!

Mack

The Column Count is the number of columns in a combo box or list box
Row Source query or table. It can also be used with a value list Row
Source, but that doesn't seem to apply here. The Bound Column is the
one Access "sees" when it looks at the combo box. With this Row
Source you have three columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet,
Format tab) of 3; otherwise HandlingTeam is all that will be available
in the combo box. If the Bound Column (Data tab) is 1 (first column),
Access will "see" Handling Team when it looks at the combo box unless
you specify otherwise. If the combo box is bound to a field, the bound
column is the data that will be stored in the field.

The Column Widths (Format tab) is the widths of the columns when you
click the combo box drop-down arrow. If you do not specify otherwise
the first column in the Row Source will be the only visible data, and
it will be the width of the combo box. If you have something like
CompanyID, CompanyName as the Row Source, you probably intend for your
users to select the CompanyName, but you want to store the CompanyID,
which will stay the same if the company changes its name. In that
case the Column Count is 2, the Column Widths are 0";1.5" (or whatever
for the second column), and the Bound Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call the
combo box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam. It
may not matter in this case, but in some situations it does, and in
all cases you know exactly to what you are referring in the code. It
also makes it easier when you post a question.


Bruce,
The ClientID is a 4 number random number assigned to each new record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


:

The code would be helpful. It is by chance that I am still
monitoring this
thread. I usually stop after a couple of weeks at the most. I have
to say
I did not spend much time trying to sort out the previous part of
the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for
a client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is
its After
Update event (which is where you would modify the Row Source for the
Team
combo box)? What is the Column Count, and which is the Bound
Column?
What is the Row Source for the Team combo box? What is the Column
Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that
information is
stored.

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on
which center
is
selected the second combo box HandlingTm displays a choice of
teams, i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing a
button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo
box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box for
the
current record being looked at. Final product should look like
this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being
fields. I
will
respond again with exact errors and any code that was written.
Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be
specific.
You
wrote "I tried the unbound textbox = method but did not work for
me". In
what way did it not work? What exactly did you place in the
Control
Source
for the unbound text box? If the information is as you described
earlier
my
suggestion will work. You can test each element of the Control
Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions
using the
ampersand. If not, describe the result produced by the
expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like
this:
There is a combo box for selecting a state or province. After
that
selection is made, the City combo box is requeried to display
only cities
and towns in that state or province. I don't see where you have
this
sort
of situation. If you do, where exactly does it occur?

message
Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo
boxes.
Each
field currently only holds one value, I just need the displayed
number
to
be
a concatenated value. My problem is that what this number is
depends on
what
is chosen in the cascading combo boxes. I can send a copy of
the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my
tables. Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr,
and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I,
M, and W
for the
Centers. I tried the unbound textbox = method but did not
work for
me.
Also, previously I had the format set to "0000" because I
need the
number to
display as four digits. This is not working with the
cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that
you're
trying
(in
at least two places) to store multiple pieces of information
in one
field.
This violates the basic principle that fields should be
"atomic" -
storing
only one chunk of information. It's always easier to
concatenate three
or
four
values together into a string than it is to tease them apart;
for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")


 
B

BruceM

I don't see how it is possible to select a handling center for a new record
if the list is limited to records in which HandlingCtr is equal to
HandlingCtr on the current record. Assuming LNA_Record is the form on which
cblHandlingCtr is located, including the WHERE conditon will geive you no
records at all for a new record, or one record otherwise. Actually, it
could give you more than one record if there are several records in
tblHandlingCtr with the same value in the HandlingCtr field, but it is still
difficult to see how this would be helpful. I ahve been assuming that
tblHandlingCtr is a table that lists Handling Centers, with one record for
each Center. If this is incorrect, please describe the purpose of
tblHandlingCtr.

What exactly is the relationship between handling teams and handling
centers? Does each center have several teams? If so, is a team associated
with more than one handling center? Or is it something else entirely?

If you copied the SQL from your project, note that there are two spellings
of LNA Record (LNARecord) for the two combo boxes. Otherwise I suppose it
is just a typo here.

MackBlale said:
Bruce,
Details it is:

What is the basic structure of the table to which the form is bound?
FirstName, LastName, ClientID, PrimaryEmail, AddressStreet, Address City.

What is the Row Source of cboHandlingCtr? Please post the SQL.
qryHandlingCtr:
SELECT tblHandlingTeam.IDHandlingCtr, tblHandlingTeam.HandlingTeam,
tblHandlingTeam.IDTeam
FROM tblHandlingTeam
WHERE (((TblHandlingCtr.HandlingCtr)=[Forms]![LNA Record]![HandlingCtr]))
ORDER BY TblHandlingCtr.HandlingTeam;
What is the After Update event of cboHandlingCtr?
Private Sub HandlingCenter_AfterUpdate()
Me.CboHandlingTeam.Requery
End Sub

Is this still the SQL for cboHandlingTeam?
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=
[Forms]![LNARecord]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam
YES, this is correct All that I have done thus far is rename the combo box
and add the TmDesigNtr Field to tblHandlingTeam.

Thanks.

BruceM said:
A combo box is cascading, as the term is generally used, if the drop-down
list is modified based on data elsewhere.

I need to ask you to back up a bit here and fill me in on the details.

What is the basic structure of the table to which the form is bound?
Sample fields are sufficient; I don't need to know all of the fields.

What is the Row Source of cboHandlingCtr? Please post the SQL. If the
Row Source is "SELECT ...", that is the SQL. If the Row Source is a
named query, open the query in design view, click View >> SQL, and copy
what you see there. If it is a table, what are the fields?

What is the After Update event of cboHandlingCtr?

Is this still the SQL for cboHandlingTeam?
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=
[Forms]![LNARecord]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam


MackBlale said:
Bruce,
The 2 letter TmDesigNtr I want to display was added as a field to the
tblHandlingTm. My Combo boxes are Cascading and what the user selects
is what is stored in the tblEmployees. The TmDesigNtr is part of the
tblHandlingTm. This table was created strictly to make the casacading
combo boxes work.

The control source for cboHandlingTeam is HandlingTeam; the Row Source
Is qryMFT (Multi-functional Team). The column count is 1; the column
width is blank. Information from this cboHandlingTeam is stored in
tblEmployees field HandlingTeam.

The Teams are ordered by auto number because I followed the instructions
that were given to me in a forum like this. I could order them by the
Team number, but I hadn't thought of it until you mentioned it.

Quite simply, I thought, the user would see and choose a Handling Team,
ie A401 from the cboHandlingTeam. This information is stored. Then I
want to display the 2 letter identifier (CB) from
tblHandlingTM.TmDesigNtr associated with that team along with the
tblEmployees.ClientID.

Obviously I'm lost and I appreciate your patience.

Mack
You are not limited to concatenating the combo box record source data.
You can refer to other columns thus:
=cboHandlingTm.Column(1)

The column counting is zero-based in this case, so Column(1) is
actually the second column. Column(0) is the first column. If you
leave out Column() you will get the bound column.

It makes good sense to store the value that will not change. It does
not have to be the displayed column. Any values from the combo box row
source can be displayed.

If you need more information, please be clear, remembering that I
cannot see you database. For instance, you refer to "the list", which
I assume is the HandlingTeam row source, but I am not sure. For a
combo box include information about Row Source, Record Source, Bound
Column, Column Count, and Column Widths. BTW, why order by the
autonumber?

TmDesigNtr does not seem to be part of the Row Source for
cboHandlingTeam that you posted earlier. Has the Row Source changed?

Ok, I've recovered somewhat.
The user may choose the HandlingCtr which then in turn allows him to
select the HandlingTeam. These are stored values. The list is
ordered by the ID Team which is an autonumber column. There is
another column in the qry table named "TmDesgNtr" this is the column
that stores the two letter Identifier of the team. The team name may
change but the designator never will. From your reponse I guess I'm
storing the wrong infomation. The user should be able to pick the
Handling Team, ie, "A401" and the TmDesigNtr "CB" should be stored.
Then I should be able to cocantenate the Client ID & TmDesigNtr.

Combo.61 is the Hanling Team Combobox which I have renamed to
cboHandlingTm. If I'm on the right track just Holler!

Mack

The Column Count is the number of columns in a combo box or list box
Row Source query or table. It can also be used with a value list Row
Source, but that doesn't seem to apply here. The Bound Column is the
one Access "sees" when it looks at the combo box. With this Row
Source you have three columns:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam ...

The combo box needs a Column Count (on the combo box Property Sheet,
Format tab) of 3; otherwise HandlingTeam is all that will be
available in the combo box. If the Bound Column (Data tab) is 1
(first column), Access will "see" Handling Team when it looks at the
combo box unless you specify otherwise. If the combo box is bound to
a field, the bound column is the data that will be stored in the
field.

The Column Widths (Format tab) is the widths of the columns when you
click the combo box drop-down arrow. If you do not specify otherwise
the first column in the Row Source will be the only visible data, and
it will be the width of the combo box. If you have something like
CompanyID, CompanyName as the Row Source, you probably intend for
your users to select the CompanyName, but you want to store the
CompanyID, which will stay the same if the company changes its name.
In that case the Column Count is 2, the Column Widths are 0";1.5" (or
whatever for the second column), and the Bound Column is 1.

I see that you are requerying Combo61. Is that the name of the
HandlingTeam combo box?

I like to give combo boxes, text boxes etc. meaningful names that are
distinct from the field name. If the field is HandlingCtr, I call
the combo box cboHandlingCtr; for HandlingTeam it is cboHandlingTeam.
It may not matter in this case, but in some situations it does, and
in all cases you know exactly to what you are referring in the code.
It also makes it easier when you post a question.


Bruce,
The ClientID is a 4 number random number assigned to each new
record.
The HandlingCtr combo box comes from qryHandlingCtr:

SELECT tblHandlingCtr.HandlingCtr, tblHandlingCtr.IDHandlingCtr
FROM tblHandlingCtr
ORDER BY tblHandlingCtr.IDHandlingCtr;

The After Update event is:
Private Sub HandlingCenter_AfterUpdate()
Me.Combo61.Requery

End Sub

The Row Source for the Handling Team is:
SELECT tblHandlingTeam.HandlingTeam, tblHandlingTeam.IDTeam,
tblHandlingTeam.IDHandlingCtr
FROM tblHandlingTeam
WHERE (((tblHandlingTeam.IDHandlingCtr)=[Forms]![LNA
Record]![HandlingCenter]))
ORDER BY tblHandlingTeam.IDTeam;

I don’t understand the bound column and column count terms.

Mack


:

The code would be helpful. It is by chance that I am still
monitoring this
thread. I usually stop after a couple of weeks at the most. I
have to say
I did not spend much time trying to sort out the previous part of
the
thread.

Here is some needed information:
What information are you storing using the form? You speak about
creating a
ClientID. Does that mean you are creating a new Client record, for
a client
who does not yet exist?
What is the the Row Source for the HandlingCtr combo box? What is
its After
Update event (which is where you would modify the Row Source for
the Team
combo box)? What is the Column Count, and which is the Bound
Column?
What is the Row Source for the Team combo box? What is the Column
Count,
and which is the Bound Column?

Again, you should be able to concatenate the three fields: Client,
HandlingCtr, and Team, but first we need to find where that
information is
stored.

Ok,
I will start from the top:
I have two cascading combo boxes. One is used to select the
HandlingCtr
(MNC-I, MND-B, MND-C, MND-N, MNF-W, or MEDCOM). Depending on
which center
is
selected the second combo box HandlingTm displays a choice of
teams, i.e.
(OPSCEN, A401, A402, etc). My ClientID is generated by pressing
a button
and
then never changes as it is the key index. In the form after the
ClientID
is
generated and the HandlingCtr and Team are selected in the combo
box I
want
to display [ClientID] & [CtrDsgNtr] & [TmDsgNtr] in a text box
for the
current record being looked at. Final product should look like
this:
1234IA.
A table holds information with CtrDsgNtr and TmDsgNtr being
fields. I
will
respond again with exact errors and any code that was written.
Merry
Christmas!

Mack

:

When describing an error or unexpected result you need to be
specific.
You
wrote "I tried the unbound textbox = method but did not work for
me". In
what way did it not work? What exactly did you place in the
Control
Source
for the unbound text box? If the information is as you
described earlier
my
suggestion will work. You can test each element of the Control
Source
expression. If you need to format EmployeeID as four digits:
=Format([EmployeeID],"0000")
Next try to get the letter code for the Center:
=Right(
,1)
Then try getting the letter from the Team value:
=Chr([Team] - 36)

If each expression works by itself, concatenate the expressions
using the
ampersand. If not, describe the result produced by the
expression(s)
that
did not work as expected.

Cascading combo boxes are generally taken to mean something like
this:
There is a combo box for selecting a state or province. After
that
selection is made, the City combo box is requeried to display
only cities
and towns in that state or province. I don't see where you have
this
sort
of situation. If you do, where exactly does it occur?

message
Bruce & John,
Thanks for all your help. The way I came up with the Handling
Ctr/Tm
values
was by choosing one of three ways to make my cascading combo
boxes.
Each
field currently only holds one value, I just need the
displayed number
to
be
a concatenated value. My problem is that what this number is
depends on
what
is chosen in the cascading combo boxes. I can send a copy of
the
database
if
that helps. Sorry if I'm making this difficult.

Mack

:

On Thu, 4 Dec 2008 07:49:01 -0800, MackBlale

Bruce,
While experimenting I simply added another column to my
tables. Now
in
tblHandlingCtr I have the fields IDHandlingCtr, HandlingCtr,
and
CtrDesigNtr.
In tblHandlingTeam I have HandlingTeam, HandlingCtr, and
TmDesigNtr.
The
designator field holds values A-Z for the Teams and B, C, I,
M, and W
for the
Centers. I tried the unbound textbox = method but did not
work for
me.
Also, previously I had the format set to "0000" because I
need the
number to
display as four digits. This is not working with the
cognate. Still
plugging away,

PMFJI but... it looks like the root of your problem is that
you're
trying
(in
at least two places) to store multiple pieces of information
in one
field.
This violates the basic principle that fields should be
"atomic" -
storing
only one chunk of information. It's always easier to
concatenate three
or
four
values together into a string than it is to tease them apart;
for
example

ShowID: [HandlingTeam] & [HandlingCtr] & Format([TmDesigNtr,
"0000")


 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top