Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Queries

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-03-2005, 10:22 AM
Novice
 
Join Date: Dec 2005
Posts: 1
louisa14
Default Add combo box to parameter query

I am trying to narrow down records of students by subject code and time code. I have a parameter query that prompts users to enter the values. Is there anyway that I can have a combo box instead of having users enter the data themselves? Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 12-10-2005, 05:38 AM
Expert
 
Join Date: Dec 2005
Location: Wilmington, DE - USA
Posts: 275
matthewspatrick
Send a message via MSN to matthewspatrick
Default

You can do this, but not directly in the query definition itself. You will have to design a form that will have the ComboBox. You could then use code behind the form to implement your selection criterion in a few different ways. For example, if you are ultimately displaying the info in a report, you can use the VBA code to dynamically set the report's data source SQL statement (the ComboBox selection would be used to define the WHERE clause).

I sometimes go one better by using a multiselect ListBox, and then use code to dynamically build the IN () statement I use in the WHERE clause.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter Parameter Value plesser Access 1 11-08-2008 07:27 AM
Telling Query to Pull All Records by Combo Box tigers Forms 1 04-28-2008 12:47 PM
How to create a query for logical combo?? valkyry Queries 1 10-08-2007 12:32 PM
Pull Parameter Value from Form dymondjack Queries 1 02-14-2007 04:15 PM
Date Parameter shakira Queries 2 03-09-2006 09:55 AM


All times are GMT -8. The time now is 02:49 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.