Why is my copied Query is keeping parameters?

M

M.Garza

Hello,

I'm a huge fan of these groups and hope you can conitnue helping me
out.

I started my databse with one query that had no parameters and copied
it a few times, rearranged the information, changed the name and
created three reports off the thre different copies. Everything works
fine until I set a paramater to the original query, then when I go to
two of the copied queries, I am asked for the paramaters [enter start
date] and [end date] in addition to the parameter I've set for the
other two [enter mmm yyy]. Intrestingly enough I am not being prompted
to enter additional parameters to the third copied query, that one only
asks me for the parameter I've set in it.

Why would ACCESS do this?

Any help is greatly appreciated!

Maria
 
A

Allen Browne

Sounds like another case of Name AutoCorrect.

Try this sequence (in order):

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Open Query2 in design view.
Switch to SQL View (View menu.)
Copy the SQL statement to clipboard (Ctrl+C).
Paste into Notepad.
Close and delete the query.

4. Create a new query.
Switch to SQL View.
Paste the query statement back in.
 
M

M.Garza

Thanks, I tried but still keeps giving me the parameter to the first
query. i followed your steps to the dot and sitll no luck. I'm going
to try creating a brand new query and see if this works.

Thank you for helping!
Maria

Allen said:
Sounds like another case of Name AutoCorrect.

Try this sequence (in order):

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Open Query2 in design view.
Switch to SQL View (View menu.)
Copy the SQL statement to clipboard (Ctrl+C).
Paste into Notepad.
Close and delete the query.

4. Create a new query.
Switch to SQL View.
Paste the query statement back in.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

M.Garza said:
Hello,

I'm a huge fan of these groups and hope you can conitnue helping me
out.

I started my databse with one query that had no parameters and copied
it a few times, rearranged the information, changed the name and
created three reports off the thre different copies. Everything works
fine until I set a paramater to the original query, then when I go to
two of the copied queries, I am asked for the paramaters [enter start
date] and [end date] in addition to the parameter I've set for the
other two [enter mmm yyy]. Intrestingly enough I am not being prompted
to enter additional parameters to the third copied query, that one only
asks me for the parameter I've set in it.

Why would ACCESS do this?

Any help is greatly appreciated!

Maria
 
M

M.Garza

Could be, but how do I find that out?
I've gone over the sql on each query and there is nothing that asks for
that first parameter.

This is driving me nuts!

Thanks,
Maria said:
Is there any chance the original query is being called by the copies?

M.Garza said:
Thanks, I tried but still keeps giving me the parameter to the first
query. i followed your steps to the dot and sitll no luck. I'm going
to try creating a brand new query and see if this works.

Thank you for helping!
Maria

Allen said:
Sounds like another case of Name AutoCorrect.

Try this sequence (in order):

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Open Query2 in design view.
Switch to SQL View (View menu.)
Copy the SQL statement to clipboard (Ctrl+C).
Paste into Notepad.
Close and delete the query.

4. Create a new query.
Switch to SQL View.
Paste the query statement back in.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Hello,

I'm a huge fan of these groups and hope you can conitnue helping me
out.

I started my databse with one query that had no parameters and copied
it a few times, rearranged the information, changed the name and
created three reports off the thre different copies. Everything works
fine until I set a paramater to the original query, then when I go to
two of the copied queries, I am asked for the paramaters [enter start
date] and [end date] in addition to the parameter I've set for the
other two [enter mmm yyy]. Intrestingly enough I am not being prompted
to enter additional parameters to the third copied query, that one only
asks me for the parameter I've set in it.

Why would ACCESS do this?

Any help is greatly appreciated!

Maria
 
M

M.Garza

I am asked to enter the parameters when opening the query and the
report.

I think I resolved the issue though, I followed Allen and John's advice
regarding the Name auto correct then took the first query that started
it all and copied the Sql over to a blank notepad as Allen suggested.
I then went back to the database and opened a new query in design mode,
Sql, pasted the statement back in and saved it under a totally new
name. Of course I did not want to try it but I had to. I placed one
parameter in the date field, saved and closed the new query. I went to
one of the OTHER queries that had been prompting for the parameter of
the first query and it wasn't asking for the parameter I placed in the
new query I created off the first one! I tried out all three reports
and each are now asking for the appropriate parameter placed in the
query feeding it!

This is really confusing but it worked.

For now I can start breathing again, this project started out as a
smalll "keep track of employee time" then grew to this monster thing
that I thought I wouldn't be able to overcome. Thanks to all of you
for helping me out!!!

Maria


Jerry said:
Are you prompted for the parameter when running the queries OR just when
running the report? It's possible that you are sorting and grouping within
the report on a field that you've changed.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


M.Garza said:
Hello,

I'm a huge fan of these groups and hope you can conitnue helping me
out.

I started my databse with one query that had no parameters and copied
it a few times, rearranged the information, changed the name and
created three reports off the thre different copies. Everything works
fine until I set a paramater to the original query, then when I go to
two of the copied queries, I am asked for the paramaters [enter start
date] and [end date] in addition to the parameter I've set for the
other two [enter mmm yyy]. Intrestingly enough I am not being prompted
to enter additional parameters to the third copied query, that one only
asks me for the parameter I've set in it.

Why would ACCESS do this?

Any help is greatly appreciated!

Maria
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top