Solved

Combo Box to display ID's used only

Posted on 2012-03-12
8
212 Views
Last Modified: 2012-03-12
I am trying to create a combo box that will only display the ID's that have been used on the master table. I have one table called customer type that gives a unique key and description for customer types. When the master table is populated with customers the users choose from a drop down list that is populated with the unique ID and description from the Customer Type table.

Now I am in the process of creating a multi-parameter query that will display customers based on what the user chooses from multiple combo boxes on a form. The challenge I am running into is there are some customer types that have not been used yet. I need that customer type combo box to only show the ones that have been used on the master table, not all of them from the Customer Type table.

I have searched and searched this board, in fact I have spent the last couple hours doing so, trying to find my answer and keep coming up empty. It is probably in how I am doing my search of the board, but I have tried several combinations of words and still cannot seem to find the answer. I know it is probably something simple but it is costing me a lot of time to find it.

Thanks,
0
Comment
Question by:caseyu
  • 4
  • 3
8 Comments
 

Expert Comment

by:gnetgnet
Comment Utility
Can you share the query and the tables layouts?
0
 

Expert Comment

by:gnetgnet
Comment Utility
If your query has a join between the 2 tables,  only the ones that are on both will be included
0
 
LVL 42

Assisted Solution

by:dqmq
dqmq earned 125 total points
Comment Utility
Make the rowsource for your combobox like this:

Select t.* from CustomerType as T inner join MasterTable as M on M.CustomerTypeID = t.CustomerTypeID


Of course, you need to substitute your table and column names
0
 

Author Comment

by:caseyu
Comment Utility
I have been accused of this before and a lot of the time it is true since I am not always 100% sure how to ask for what I want, but I might not have been very clear. On the combo box for the multi parameter query, I only want the Customer Type (cTypeID) to show up once if it exists on the Master table. Below is the copy of the code that I entered in the row source. I got it to give me a list but it is giving me the cTypeID for every customer that is in the master table, not limiting it to 1 if it exists on the table.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:caseyu
Comment Utility
SELECT t.* FROM tblTypes AS T INNER JOIN tblContact_Primary AS M ON M.cTypeID = t.cTypeID;
0
 

Expert Comment

by:gnetgnet
Comment Utility
try select distinct only selecting Cust type, not *
0
 

Accepted Solution

by:
gnetgnet earned 125 total points
Comment Utility
SELECT DISTINCT t.cTypeID FROM tblTypes AS T INNER JOIN tblContact_Primary AS M ON M.cTypeID =  t.cTypeID;
0
 

Author Comment

by:caseyu
Comment Utility
GNET got me the final answer but both helped out so I am splitting the points.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now