| Chat with a LIVE Microsoft
Access Expert! |
||||
|
||||
|
#1
|
|||
|
|||
|
I have a query parameter that I'm running from a form and it works fine the first time. Pops up and asks me for the parameter with no problem and the query runs fine. However, if I run the same query again it doesn't ask me for the parameter - it just takes whatever I entered the first time. How do I clear this so it always asks me for the parameter?
|
| Sponsored Links |
|
#2
|
||||
|
||||
|
Are you capturing the parameter in a control on the form?
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil |
|
#3
|
|||
|
|||
|
No - I'm just using the parameter built in dialog. I works fine if I close the form and then reopen it but obviously I don't really want to do that.
|
|
#4
|
||||
|
||||
|
Well then, do capture it in the form.
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil |
|
#5
|
|||
|
|||
|
Thanks - but I don't want to capture it in a form. I just want to rerun the query like it runs the first time - with the built in popup.
|
|
#6
|
||||
|
||||
|
Ok, having thought about this, I supect that what is happening is:
1) you have a comand button on your form that runs the query 2) When you click on this, it runs the query and the parameter dialogue box appears 3) You complete the parameter, the query runs 4) You return to the form 5) You click the query button again, but because the query is still open in the background, it simply switches the view back to the query 6) You then think the query has re-run with the old parameter, but it hasn't, it's the same query result If you had closed the query after step 3) the parameter box would appear ready for the new parameter. There must be something in the code in the form that closes the query, so that closing and re-opening the form makes it work.
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil Last edited by neileg; 09-03-2007 at 06:35 AM.. |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| retrieving parameter query records | Penmore | Modules & VBA | 0 | 11-23-2006 11:24 PM |
| Adding a Auto increment Text/Number | elliotth123 | Tables | 12 | 09-13-2006 05:18 AM |
| Parameter Query | uplink600 | Forms | 1 | 03-16-2005 12:00 PM |
| parameter crosstab query in VBA | huebner | Modules & VBA | 5 | 01-31-2005 07:24 AM |
| Report & Update Query Based on Parameter | Carmen | Queries | 3 | 01-07-2002 06:39 AM |