Solved

How do I create Access 2007 dynamic Combo Box

Posted on 2011-02-26
6
565 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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