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
  #11  
Old June 7th, 2005, 12:22 AM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

Thanks Nikos, it's on the way.

d


"Nikos Yannacopoulos" wrote in message
...
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.




  #12  
Old June 7th, 2005, 04:00 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

I leave this to Nikos aince I am sure he works it out in no time when he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
...
Great question, I'll check that out this morning.

Thanks!

Darhl




  #13  
Old June 7th, 2005, 04:03 AM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

Thanks for your help Van! It's appreciated.

d


"Van T. Dinh" wrote in message
...
I leave this to Nikos aince I am sure he works it out in no time when he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
...
Great question, I'll check that out this morning.

Thanks!

Darhl






  #14  
Old June 7th, 2005, 04:11 AM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

You know what? I just reread your post, and it clued me in to what I was
doing wrong. I had the bound column the 1st column which was the owner ID,
not the owner name. When I changed the bound column to 2 (the owner name)
then the query/report started working!

Thanks Van! Your suggestion was perfect.

Nikos, no need to tear through my database...unless you want to anyway and
can see some way to improve it.

Thanks guys! I've got more questions as I learn Access.

Darhl


"Darhl Thomason" wrote in message
...
Thanks for your help Van! It's appreciated.

d


"Van T. Dinh" wrote in message
...
I leave this to Nikos aince I am sure he works it out in no time when he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
...
Great question, I'll check that out this morning.

Thanks!

Darhl








  #15  
Old June 7th, 2005, 07:23 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Darhl,

Glad you worked it out, it's much better this way, for your skills as
well as your confidence!

By the way, since you have - correctly - joined the two tables on the
key field, you could just add it to the query and filter on that one,
leaving your combo as it was originally (bound column = 1). See change
in returned database.

Another approach you could take is to put the combo on the same form
(header section) instead of using a separate one, make the form's
recordsource unfiltered (so it returns all records when opened), and use
the combo's On Change event to apply a filter whenever changed,
dynamically, without having to move back and forth between forms. See
the new form (and unfiltered query) I added in the returned database.

HTH,
Nikos

Darhl Thomason wrote:
You know what? I just reread your post, and it clued me in to what I was
doing wrong. I had the bound column the 1st column which was the owner ID,
not the owner name. When I changed the bound column to 2 (the owner name)
then the query/report started working!

Thanks Van! Your suggestion was perfect.

Nikos, no need to tear through my database...unless you want to anyway and
can see some way to improve it.

Thanks guys! I've got more questions as I learn Access.

Darhl


"Darhl Thomason" wrote in message
...

Thanks for your help Van! It's appreciated.

d


"Van T. Dinh" wrote in message
...

I leave this to Nikos aince I am sure he works it out in no time when he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
...

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

Thanks!

Darhl







  #16  
Old June 7th, 2005, 12:59 PM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

Wow Nikos,

That's cool! I really like putting the drop down into the header of the
form. I think I can use something similar to get rid of all my other forms,
since they're all the same anyway, just based on different queries.

What I'd like to be able to do is remove the filter. I've been playing with
a command button, but can't get that figured out either.

Thanks again for all your help!!!

Darhl


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

Glad you worked it out, it's much better this way, for your skills as well
as your confidence!

By the way, since you have - correctly - joined the two tables on the key
field, you could just add it to the query and filter on that one, leaving
your combo as it was originally (bound column = 1). See change in returned
database.

Another approach you could take is to put the combo on the same form
(header section) instead of using a separate one, make the form's
recordsource unfiltered (so it returns all records when opened), and use
the combo's On Change event to apply a filter whenever changed,
dynamically, without having to move back and forth between forms. See the
new form (and unfiltered query) I added in the returned database.

HTH,
Nikos

Darhl Thomason wrote:
You know what? I just reread your post, and it clued me in to what I was
doing wrong. I had the bound column the 1st column which was the owner
ID, not the owner name. When I changed the bound column to 2 (the owner
name) then the query/report started working!

Thanks Van! Your suggestion was perfect.

Nikos, no need to tear through my database...unless you want to anyway
and can see some way to improve it.

Thanks guys! I've got more questions as I learn Access.

Darhl


"Darhl Thomason" wrote in message
...

Thanks for your help Van! It's appreciated.

d


"Van T. Dinh" wrote in message
...

I leave this to Nikos aince I am sure he works it out in no time when he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
.. .

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

Thanks!

Darhl








  #17  
Old June 7th, 2005, 01:13 PM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Darhl,

Piece of cake. Put a command button in the form header next to the combo
(caption "Clear" or "Reset"?) with two lines of code in its Click event:

Me.cboOwner = Null
Me.FilterOn = False

The first line resets the filter combo (cboOwner in my example) and the
second removes the filter.

HTH,
Nikos


Darhl Thomason wrote:
Wow Nikos,

That's cool! I really like putting the drop down into the header of the
form. I think I can use something similar to get rid of all my other forms,
since they're all the same anyway, just based on different queries.

What I'd like to be able to do is remove the filter. I've been playing with
a command button, but can't get that figured out either.

Thanks again for all your help!!!

Darhl

  #18  
Old June 7th, 2005, 01:22 PM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Dahrl,

Just for the fun of it:

Add this just before the End Sub in the cboOwner_Change sub:

Me.Command55.Enabled = (Me.cboOwner "")

and this again at the end of the Command55_Click sub:

Me.Command55.Enabled = False

where Command55 is the new command button in my example, change to the
actual button name. Then, in the form's design, change the command
button's Enabled property (tab Data) to No. See what happens.

Nikos

Darhl Thomason wrote:
Wow Nikos,

That's cool! I really like putting the drop down into the header of the
form. I think I can use something similar to get rid of all my other forms,
since they're all the same anyway, just based on different queries.

What I'd like to be able to do is remove the filter. I've been playing with
a command button, but can't get that figured out either.

Thanks again for all your help!!!

Darhl


"Nikos Yannacopoulos" wrote in message
...

Darhl,

Glad you worked it out, it's much better this way, for your skills as well
as your confidence!

By the way, since you have - correctly - joined the two tables on the key
field, you could just add it to the query and filter on that one, leaving
your combo as it was originally (bound column = 1). See change in returned
database.

Another approach you could take is to put the combo on the same form
(header section) instead of using a separate one, make the form's
recordsource unfiltered (so it returns all records when opened), and use
the combo's On Change event to apply a filter whenever changed,
dynamically, without having to move back and forth between forms. See the
new form (and unfiltered query) I added in the returned database.

HTH,
Nikos

Darhl Thomason wrote:

You know what? I just reread your post, and it clued me in to what I was
doing wrong. I had the bound column the 1st column which was the owner
ID, not the owner name. When I changed the bound column to 2 (the owner
name) then the query/report started working!

Thanks Van! Your suggestion was perfect.

Nikos, no need to tear through my database...unless you want to anyway
and can see some way to improve it.

Thanks guys! I've got more questions as I learn Access.

Darhl


"Darhl Thomason" wrote in message
...


Thanks for your help Van! It's appreciated.

d


"Van T. Dinh" wrote in message
.. .


I leave this to Nikos aince I am sure he works it out in no time when he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
. ..


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

Thanks!

Darhl






  #19  
Old June 7th, 2005, 03:45 PM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default

Very cool! It disables the button when there aren't any filters
applied...which I'm relatively sure you knew ;-)

Thanks tons!

d


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

Just for the fun of it:

Add this just before the End Sub in the cboOwner_Change sub:

Me.Command55.Enabled = (Me.cboOwner "")

and this again at the end of the Command55_Click sub:

Me.Command55.Enabled = False

where Command55 is the new command button in my example, change to the
actual button name. Then, in the form's design, change the command
button's Enabled property (tab Data) to No. See what happens.

Nikos

Darhl Thomason wrote:
Wow Nikos,

That's cool! I really like putting the drop down into the header of the
form. I think I can use something similar to get rid of all my other
forms,
since they're all the same anyway, just based on different queries.

What I'd like to be able to do is remove the filter. I've been playing
with
a command button, but can't get that figured out either.

Thanks again for all your help!!!

Darhl


"Nikos Yannacopoulos" wrote in message
...

Darhl,

Glad you worked it out, it's much better this way, for your skills as
well
as your confidence!

By the way, since you have - correctly - joined the two tables on the key
field, you could just add it to the query and filter on that one, leaving
your combo as it was originally (bound column = 1). See change in
returned
database.

Another approach you could take is to put the combo on the same form
(header section) instead of using a separate one, make the form's
recordsource unfiltered (so it returns all records when opened), and use
the combo's On Change event to apply a filter whenever changed,
dynamically, without having to move back and forth between forms. See the
new form (and unfiltered query) I added in the returned database.

HTH,
Nikos

Darhl Thomason wrote:

You know what? I just reread your post, and it clued me in to what I
was
doing wrong. I had the bound column the 1st column which was the owner
ID, not the owner name. When I changed the bound column to 2 (the owner
name) then the query/report started working!

Thanks Van! Your suggestion was perfect.

Nikos, no need to tear through my database...unless you want to anyway
and can see some way to improve it.

Thanks guys! I've got more questions as I learn Access.

Darhl


"Darhl Thomason" wrote in message
.. .


Thanks for your help Van! It's appreciated.

d


"Van T. Dinh" wrote in
message
. ..


I leave this to Nikos aince I am sure he works it out in no time when
he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
.. .


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

Thanks!

Darhl






  #20  
Old June 8th, 2005, 09:15 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Welcome!

Darhl Thomason wrote:
Very cool! It disables the button when there aren't any filters
applied...which I'm relatively sure you knew ;-)

Thanks tons!

d


"Nikos Yannacopoulos" wrote in message
...

Dahrl,

Just for the fun of it:

Add this just before the End Sub in the cboOwner_Change sub:

Me.Command55.Enabled = (Me.cboOwner "")

and this again at the end of the Command55_Click sub:

Me.Command55.Enabled = False

where Command55 is the new command button in my example, change to the
actual button name. Then, in the form's design, change the command
button's Enabled property (tab Data) to No. See what happens.

Nikos

Darhl Thomason wrote:

Wow Nikos,

That's cool! I really like putting the drop down into the header of the
form. I think I can use something similar to get rid of all my other
forms,
since they're all the same anyway, just based on different queries.

What I'd like to be able to do is remove the filter. I've been playing
with
a command button, but can't get that figured out either.

Thanks again for all your help!!!

Darhl


"Nikos Yannacopoulos" wrote in message
...


Darhl,

Glad you worked it out, it's much better this way, for your skills as
well
as your confidence!

By the way, since you have - correctly - joined the two tables on the key
field, you could just add it to the query and filter on that one, leaving
your combo as it was originally (bound column = 1). See change in
returned
database.

Another approach you could take is to put the combo on the same form
(header section) instead of using a separate one, make the form's
recordsource unfiltered (so it returns all records when opened), and use
the combo's On Change event to apply a filter whenever changed,
dynamically, without having to move back and forth between forms. See the
new form (and unfiltered query) I added in the returned database.

HTH,
Nikos

Darhl Thomason wrote:


You know what? I just reread your post, and it clued me in to what I
was
doing wrong. I had the bound column the 1st column which was the owner
ID, not the owner name. When I changed the bound column to 2 (the owner
name) then the query/report started working!

Thanks Van! Your suggestion was perfect.

Nikos, no need to tear through my database...unless you want to anyway
and can see some way to improve it.

Thanks guys! I've got more questions as I learn Access.

Darhl


"Darhl Thomason" wrote in message
. ..



Thanks for your help Van! It's appreciated.

d


"Van T. Dinh" wrote in
message
.. .



I leave this to Nikos aince I am sure he works it out in no time when
he
gets a copy of your database.

Van T. Dinh
MVP (Access)



"Darhl Thomason" wrote in message
. ..



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

Thanks!

Darhl





 




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 05:56 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.