A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Parameter query



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2005, 01:52 PM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default Parameter query

I'm creating a parameter query in my database, but I'd like the users to be
able to choose the parameter (like from a dropdown list) instead of having
to know the exact spelling of the parameter. Is this possible? The
selections for the parameter are in a separate table.

Thanks!

Darhl


  #2  
Old June 3rd, 2005, 01:58 PM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Darhl,

Suppose you make a form called frmQueryParameters, and put a combo box
on it to read the values from the table so the user can choose from,
named Combo1. The criterion in your query should be:

[Forms]![frmQueryParameters]![Combo1]

HTH,
Nikos

Darhl Thomason wrote:
I'm creating a parameter query in my database, but I'd like the users to be
able to choose the parameter (like from a dropdown list) instead of having
to know the exact spelling of the parameter. Is this possible? The
selections for the parameter are in a separate table.

Thanks!

Darhl


  #3  
Old June 3rd, 2005, 10:51 PM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

Hi Nikos,

Thanks for the idea, it seems like it should work, but it's not. I did as
you suggested, but the dialog box that comes up asking for the parameter
merely says "[Forms]![frmQueryParameters]![Combo1]" and still just gives me
a text box for me to type in my selection, then the query works. I'm not
getting the dropdown box in there like I want.

Any other ideas?

Darhl



"Nikos Yannacopoulos" wrote in message
...
Darhl,

Suppose you make a form called frmQueryParameters, and put a combo box on
it to read the values from the table so the user can choose from, named
Combo1. The criterion in your query should be:

[Forms]![frmQueryParameters]![Combo1]

HTH,
Nikos

Darhl Thomason wrote:
I'm creating a parameter query in my database, but I'd like the users to
be
able to choose the parameter (like from a dropdown list) instead of
having
to know the exact spelling of the parameter. Is this possible? The
selections for the parameter are in a separate table.

Thanks!

Darhl



  #4  
Old June 4th, 2005, 08:16 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

You have to open the Form *first*, select a value in the ComboBox and then
run the Query.

The Query won't open the Form for you.

--
HTH
Van T. Dinh
MVP (Access)




"Darhl Thomason" wrote in message
...
Hi Nikos,

Thanks for the idea, it seems like it should work, but it's not. I did as
you suggested, but the dialog box that comes up asking for the parameter
merely says "[Forms]![frmQueryParameters]![Combo1]" and still just gives

me
a text box for me to type in my selection, then the query works. I'm not
getting the dropdown box in there like I want.

Any other ideas?

Darhl





  #5  
Old June 5th, 2005, 01:55 AM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

OK, I understand, however it still doesn't work. I select the value in the
combo box, then run the other form that pulls the query...but doesn't return
any values...

d
"Van T. Dinh" wrote in message
...
You have to open the Form *first*, select a value in the ComboBox and then
run the Query.

The Query won't open the Form for you.

--
HTH
Van T. Dinh
MVP (Access)




"Darhl Thomason" wrote in message
...
Hi Nikos,

Thanks for the idea, it seems like it should work, but it's not. I did
as
you suggested, but the dialog box that comes up asking for the parameter
merely says "[Forms]![frmQueryParameters]![Combo1]" and still just gives

me
a text box for me to type in my selection, then the query works. I'm not
getting the dropdown box in there like I want.

Any other ideas?

Darhl







  #6  
Old June 5th, 2005, 03:33 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

Does the BoundColumn of the ComboBox corresponds to the value you are
looking for?

Note that what displays in the ComboBox may not be the value of the ComboBox
(that is passed to the Query). The Value of the ComboBox (i.e. the value of
the BoundColumn of the selected row) is passeded to the Query, not what's
displayed.

--
HTH
Van T. Dinh
MVP (Access)


"Darhl Thomason" wrote in message
...
OK, I understand, however it still doesn't work. I select the value in

the
combo box, then run the other form that pulls the query...but doesn't

return
any values...

d



  #7  
Old June 6th, 2005, 08:38 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Also, you have substituted my hypothetical form and combo names with the
actual ones, right?

Van T. Dinh wrote:
Does the BoundColumn of the ComboBox corresponds to the value you are
looking for?

Note that what displays in the ComboBox may not be the value of the ComboBox
(that is passed to the Query). The Value of the ComboBox (i.e. the value of
the BoundColumn of the selected row) is passeded to the Query, not what's
displayed.

  #8  
Old June 6th, 2005, 01:51 PM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

Yep, sure have...not sure why it's not working.

d


"Nikos Yannacopoulos" wrote in message
...
Also, you have substituted my hypothetical form and combo names with the
actual ones, right?

Van T. Dinh wrote:
Does the BoundColumn of the ComboBox corresponds to the value you are
looking for?

Note that what displays in the ComboBox may not be the value of the
ComboBox
(that is passed to the Query). The Value of the ComboBox (i.e. the value
of
the BoundColumn of the selected row) is passeded to the Query, not what's
displayed.



  #9  
Old June 6th, 2005, 02:13 PM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

If you want, you are welcome to compact (and zip if big) your database
and mail it to me to have a look.

Darhl Thomason wrote:
Yep, sure have...not sure why it's not working.

d


"Nikos Yannacopoulos" wrote in message
...

Also, you have substituted my hypothetical form and combo names with the
actual ones, right?

Van T. Dinh wrote:

Does the BoundColumn of the ComboBox corresponds to the value you are
looking for?

Note that what displays in the ComboBox may not be the value of the
ComboBox
(that is passed to the Query). The Value of the ComboBox (i.e. the value
of
the BoundColumn of the selected row) is passeded to the Query, not what's
displayed.




  #10  
Old June 6th, 2005, 02:14 PM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

Great question, I'll check that out this morning.

Thanks!

Darhl


"Van T. Dinh" wrote in message
...
Does the BoundColumn of the ComboBox corresponds to the value you are
looking for?

Note that what displays in the ComboBox may not be the value of the
ComboBox
(that is passed to the Query). The Value of the ComboBox (i.e. the value
of
the BoundColumn of the selected row) is passeded to the Query, not what's
displayed.

--
HTH
Van T. Dinh
MVP (Access)


"Darhl Thomason" wrote in message
...
OK, I understand, however it still doesn't work. I select the value in

the
combo box, then run the other form that pulls the query...but doesn't

return
any values...

d





 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass a parameter to nested query laura Running & Setting Up Queries 6 February 22nd, 2005 02:49 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Running & Setting Up Queries 1 December 13th, 2004 07:54 PM
Populate report header field from query parameter jh Setting Up & Running Reports 7 November 13th, 2004 06:38 AM
Calling Parameter Query With SQL ChrisM General Discussion 0 August 4th, 2004 01:07 PM
Parameter Query Help mark Running & Setting Up Queries 4 June 2nd, 2004 04:40 PM


All times are GMT +1. The time now is 04:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.