Concatenated field displays Primary Key, need description

MissaLissa

New Member
Joined
Jul 2, 2013
Messages
26
Greetings Experts

I have a subform that contains a combo box for "Reason Category". The Reason Category table contains Category ID (Primary Key) and Reason Category.

Category ID
Reason Category
0
N/A
1
Underwriting
2
Marketing & Sales
3
Claims
4
Policyholder Services
5
Miscellaneous

<tbody>
</tbody>


I have another combo box for "Reason" which displays items based on what was chosen in the Reason Category field. The Reason table contains the Primary Key number from the Reason Category table. (small sample below)

Category Number
Reason
3
Unsatisfactory Settlements
0
U&C Reduction
2
Replacement
1
Refusal to Insured
1
Recession

<tbody>
</tbody>


These are set up so that categories chosen are passed through to a master table. The data passed through is the description not the primary key. However, when creating a select query which creates a new field with the Reason Category and the Reason fields concatenated, the results are as: 3 - Unsatisfactory Settlements. I need it to be displayed as: Claims - Unsatisfactory Settlements

Can someone please help me solve this issue?
 
Issue: If I select the Reason Category and/or Reason fields from the Master table I get the description. Great, That works fine… But if I concatenate the two fields in a select query I get the Reason Category primary key. (Expression: [tbl_001Master].[Reason Category] & " - " & [tbl_001Master].[Reason])
Reason Category
Reason
Concatenated
Claims
Denial of Claim
3 - Denial of Claim
Underwriting
Cancellation
1 - Cancellation
Claims
Unsatisfactory Settlements
3 - Unsatisfactory Settlements

<thead>
</thead><tbody>
</tbody>

To answer your question…Yes, there are two combo boxes in the form. I have them set up so that when you choose the Reason Category only the reasons associated with the chosen category will be displayed in the Reason box. I want both boxes to show the description, not the Category ID/Number.

Combo Box 1 – cboReasonCategory – bound to Column 1, Column Count 2, Column Widths 0”;1”. When I click on the dropdown only the Reason Category appears.

Combo Box Row Source:
SELECT [tbl_Reason Category].[Category ID], [tbl_Reason Category].[Reason Category]
FROM [tbl_Reason Category]
WHERE ((([tbl_Reason Category].[Category ID])>0))
ORDER BY [tbl_Reason Category].[Category ID];
tbl_Reason Category
Category ID
Reason Category
0
N/A
1
Underwriting
2
Marketing & Sales
3
Claims
4
Policyholder Services
5
Miscellaneous

<thead>
</thead><tbody>
</tbody>

Combo Box 2 – cboReason – bound to Column 1, Column Count 1, Column Widths 1. This combo box displays only the items that are associated with the Reason Category ID that was chosen in cboReasonCategory combo box.”.








Combo Box Row Source:
SELECT tbl_Reason.Reason
FROM tbl_Reason
WHERE (((tbl_Reason.[Category Number])=[Forms]![f_CalPERS Main Menu]![f_CalPERS Complaints].[Form]![cboReasonCategory]));
tbl_Reason
Category Number
Reason
3
Unsatisfactory Settlements
0
U&C Reduction
2
Replacement
1
Refusal to Insured

<thead>
</thead><tbody>
</tbody>

Table Relationships:
tbl_Reason Category.Reason Category is linked to tbl_001Master.Reason Category
tbl_Reason.Reason is linked to tbl_001Master.Reason
tbl_Reason Category.Category ID is linked to tbl_Reason.Category Number
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Do you actually have lookups in your tables? That may be why this is happening (because otherwise what you describe is impossible). Anyway, try a lookup on the Reason Category table using the reason number. Because we are obviously getting the number/ID, not the description.

DLOOKUP("[Reason Category]", "[Reason Category]","[Category ID] = " & [tbl_001Master].[Reason Category])

(above function is written with the assumption that category id in the Reason Category table is numeric)
 
Upvote 0

Forum statistics

Threads
1,215,365
Messages
6,124,512
Members
449,167
Latest member
jrob72684

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top