473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Query and combo box to select parameter

Hello

I want to make a parameter query where i can select the parameter out of a
drop down box instead of typing the parameter in a text box.

For example: if i have customers and want to run a query that gives me all
the custormers from a chosen state, that i can choose the state in a drop
down list instead of knowing it by heart and typing it myself.

Does anybody has an idea or example for such a query?

Thx...

Kind regards
Erwin
Nov 13 '05 #1
3 10318
Parameters are very limited. You cannot use a combo box to select choices.
You cannot even check that the value entered is in a suitable range.

A simple idea is to create a small form where the user can enter the values.
If the form is open and the values entered on the form, the query will read
the values form the form. For example, you might set the Criteria in the
query to:
[Forms].[Form1].[Text1]

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Erwin Bormans" <er***********@verwijder.dit.telenet.be> wrote in message
news:42*********************@news.skynet.be...
Hello

I want to make a parameter query where i can select the parameter out of a
drop down box instead of typing the parameter in a text box.

For example: if i have customers and want to run a query that gives me all
the custormers from a chosen state, that i can choose the state in a drop
down list instead of knowing it by heart and typing it myself.

Does anybody has an idea or example for such a query?

Thx...

Kind regards
Erwin

Nov 13 '05 #2
"Erwin Bormans" <er***********@verwijder.dit.telenet.be> wrote in message
news:42*********************@news.skynet.be...
Hello

I want to make a parameter query where i can select the parameter out of a
drop down box instead of typing the parameter in a text box.

For example: if i have customers and want to run a query that gives me all
the custormers from a chosen state, that i can choose the state in a drop
down list instead of knowing it by heart and typing it myself.

Does anybody has an idea or example for such a query?

Thx...

Kind regards
Erwin

The easiest way to do this is simply reference the combobox in the query -
so in the criteria row you put:
Forms!MyForm!MyCombo


Nov 13 '05 #3
Many many thx

Kind regards
Erwin Bormans
"Erwin Bormans" <er***********@verwijder.dit.telenet.be> schreef in bericht
news:42*********************@news.skynet.be...
Hello

I want to make a parameter query where i can select the parameter out of a
drop down box instead of typing the parameter in a text box.

For example: if i have customers and want to run a query that gives me all
the custormers from a chosen state, that i can choose the state in a drop
down list instead of knowing it by heart and typing it myself.

Does anybody has an idea or example for such a query?

Thx...

Kind regards
Erwin

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: David | last post by:
In ASP.NET 2.0, is it possible to use a control that's on a Master Page as a select parameter in a content page's datasource control? For example, the Master Page has a drop down list of...
3
by: David | last post by:
In ASP.NET 2.0, is it possible to use a control that's on a Master Page as a select parameter in a content page's datasource control? On the content page in the VWD Configure Data Source wizard...
2
by: Wei Wang | last post by:
Hi, I want to do a select in dynamic command, something like: TRIGGER FUNCTION DECLARE table_name_suffix text; temp_result RECORD; temp_result2 RECORD;
0
by: Managed Code | last post by:
Hello, I have a status and definition table. The status table's current status field relates the ID field of the definition table. I am trying to retrieve the definitions that are associated...
1
by: rosie2006 | last post by:
Environment: .net2.0 over oracle Problem? a simple select statement within a DetailsView that gets two parameter values from a GridView SelectedValue. It might be valuable to understand that to...
3
by: penny111 | last post by:
Hi, I have created an MS Access database containing the following tables: Crime CrimeCommitted Criminal CriminalOrganization CriminalType HideoutType
1
missshaikh
by: missshaikh | last post by:
SQL Query to select top 10 records except for the top 10 records I just need aSQL Server Query that can select the next 10 records after the first top 10 records.
2
ddtpmyra
by: ddtpmyra | last post by:
I have query combo but I notice It only save the first words. For instance, Commitee Members Commitee Officials It only pick the word 'Committee' and not the next word when I get the...
1
by: pavanip | last post by:
Hi, I am having database table as TicketNo,Name,Issue Date. I inserted the data for "IssueDate" field using calender control in Asp.Net. So the table data looks like this TicketNo ...
2
by: rahullko05 | last post by:
Write a my sql query to select all username who had nokia purchased handsets "N72" in the year 2008. tables given below: Thanks -- phpMyAdmin SQL Dump -- version 3.2.0.1 --...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.