Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I create Access 2007 dynamic Combo Box

Posted on 2011-02-26
6
566 Views
Last Modified: 2012-08-13
I have a Table "Mojo"  fields Dept, SampleType and Sample.  Table "Dept" fields: Dept and DeptDesc.  Table "SampleType" fields: SampleType and SampleTypeDesc.  Table "SampleInfo" Fields: SampleName, SampleType, Dept.  Access 2007 is front end and SQL server 2005 back end.  I created a Form Mojo with a Combo Box for Dept that would select Dept and Combo Box for Sample Type to select Sample Type and I want to create a Combo box that would display SampleName field from SampeInfo table to feed into Sample Field of Mojo table.  How can I do this?
0
Comment
Question by:dpawar
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:tabish
ID: 34987732
Do you want to create a combo box on the fly or you just want to populate it based on sampletype selected in the " Sample Type " Combo box?
0
 
LVL 4

Expert Comment

by:tabish
ID: 34987795
You can use the following to populate the ComboSampleInfo (under row source property: ComboSampleInfo -> Properties -> data -> Row Source)

SELECT SampleInfo.[SampleNamed] FROM SampleInfo WHERE (((SampleInfo.SampleType)=[forms].[form1].[comboSampleType]));
 
0
 

Author Comment

by:dpawar
ID: 34987844
Based on Sample Type
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:dpawar
ID: 34988009
Thanks.
How do I do it based on SampleType and Dept combo boxes?
0
 
LVL 4

Accepted Solution

by:
tabish earned 500 total points
ID: 34988125
IN Table "SampleType" fields: SampleType and SampleTypeDesc.  
AND
Table "SampleInfo" Fields: SampleName, SampleType,

Field "SampleType" is common. Means table seemed to be linked. where as Table Dept does not seemed to be linked to either of the above tables. So comboSampleInfo cannot be based upon dept unless you introduce a new field something like deptID etc in may be sampleType table.

It means a dept will have one or mare SampleTypes and SampleTypes will have one or more SampleNames.

The Table Structure at present is:
Dept is stand alone (not linked to any of the table)
SampleTypes can have one or more SampleNames (SampleTypes is linked to SampleInfo  one-to-many relationship)

Sorry if it is a bit confusing.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 34988137
Can you post a screen shot of your Relationships diagram?
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

860 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