473,326 Members | 2,023 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,326 software developers and data experts.

parameter queries

When setting up a parameter query is it possible for the parameter dialogue box to have a combo or list box, so that a restricted reply can be entered? If so, how would I do it?
Oct 18 '06 #1
3 1361
birchw
19
Rather than have the parameter in the query, create an unbound form and add a combo box control to the form. In the rowsource property of the combo box, make this the table that you are getting the data from (whatever table your query is looking at). If you now open the form, the combo box will contain the data on the table. You can use this combo box to select data from the query, by replacing your parameter in the query with the name of the combo box on the form - instead of [Enter Value], it will be something like [Forms]![Form1]![Combo1].

The result of the query will now be based upon what you select from the combo box.
Oct 19 '06 #2
Rather than have the parameter in the query, create an unbound form and add a combo box control to the form. In the rowsource property of the combo box, make this the table that you are getting the data from (whatever table your query is looking at). If you now open the form, the combo box will contain the data on the table. You can use this combo box to select data from the query, by replacing your parameter in the query with the name of the combo box on the form - instead of [Enter Value], it will be something like [Forms]![Form1]![Combo1].

The result of the query will now be based upon what you select from the combo box.
Thank you birchw for your information, that has worked a treat. Just one thing, as I am creating this data base for others to use, how can I change what the parameter dialogue box now says ie. form!frmCombo!Combo6. I would like it to say "Enter Course Number"
Oct 22 '06 #3
birchw
19
To change the name of the combo box, just change the Name property of the combo box to EnterCourseNumber (try not to use spaces for field names).

If you want Enter Course Number to appear on the form, just edit the label and change the Caption property.
Oct 24 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Lapchien | last post by:
I have 2 queries, 1 produces a list of direct debit payments, the other then 'marks' those records as processed. The parameter is a date (usually today's date). I run these 2 queries from a...
2
by: Simon Pleasants | last post by:
Am something of a newbie at this, so please bear with any stupid questions. I have created a database to track shipments that we import. The information is stored in a table and I have created...
1
by: Cory | last post by:
When I run the subroutine testEmailContacts the msgbox says that there is only 1 record. The sql for qyEmailContactsQyCard is below. There is over 3000 records in the table "tbl:Contact". What am i...
21
by: Marc DVer | last post by:
I am trying to create a query that can be loaded as a querydef object but not having to assign values to the parameters if I don't want to. Normally when using a parameter query in VBA my code...
0
by: tlyczko | last post by:
Can anyone give me a website reference(s) wherein I can learn how to use a form and parameter queries to generate an Access report *without* having to reference the form or hard-code the query in...
6
by: tizmagik | last post by:
I am having a lot of difficulty generating a CrossTab Query based report. I have looked online for several tutorials and whatnot but I have not been able to really find what I'm looking for, nor...
0
by: Billie Boy | last post by:
Hi to all. I’m new here and am coming to you from Melbourne Australia. So a big HELLO 2 ALL. Now I am encountering an annoying problem in the SQL builder of the copy of VB.6 that I am using at...
1
by: TonyJH | last post by:
Hello, I have a database in Access2003. I have set up several queries that use the parameter entry . Each query produces different outputs from various tables that go into a report. Sometimes, a...
4
by: David Wright | last post by:
Hello Folks I have a Macro which consecutively opens seven ‘Make Table Query’s’. Each query requests two parameter inputs i.e. ‘Please Enter Department Code’ and ‘Please Enter Year’. It is...
8
by: DanicaDear | last post by:
I have something interesting...looking to see if anyone else has came across this. I have a query with parameter and and the query works beautifully every time. However, when I use the wizard...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.