Macro with Parameter/Criteria Query

  • Thread starter Thread starter Rosana
  • Start date Start date
R

Rosana

HI,

I DID A PARAMETER QUERY WHICH PROMPTS ME TO INTRODUCE A
PRODUCT CODE EACH TIME i OPEN IT. IT ALL SEEMS FIND, BUT I
APPLIED THIS TO A FORM.

I CREATED A BUTTON WHICH STARTS A MACRO TO APPLY FILTER.
THE FILTER IS THE QUERY. WHEN I OPEN THE FORM AND CLICK ON
THE BUTTON TO RUN THE QUERY, ALL WORKS FINE, ONLY THAT
AFTER I CLICK THE BUTTON "SHOW ALL RECORDS" AND WANT TO
RUN THE QUERY AGAIN. IT DOESN'T.

ANY IDEA HOW COULD I RUN THE QUERY AS MANY TIMES I NEEDED
FROM THE FORM?

tHANK YOU, ROSANA
 
Rosana

I CREATED A BUTTON WHICH STARTS A MACRO TO APPLY FILTER.
THE FILTER IS THE QUERY. WHEN I OPEN THE FORM AND CLICK ON
THE BUTTON TO RUN THE QUERY, ALL WORKS FINE, ONLY THAT
AFTER I CLICK THE BUTTON "SHOW ALL RECORDS" AND WANT TO
RUN THE QUERY AGAIN. IT DOESN'T.

What happens? Nothing? An error message? The first query's results
re-displayed?

What happens if you close the form, re-open it, and try again? (this isn't
normal, but might provide more info about what's happening)

Which version of Access? Is your db "split" front-end/back-end?

More info, please...

Jeff Boyce
<Access MVP>
 
No, nothing. The record found, it's still there. And the
button which starts the macro doesn't do anything.

When I close the form and open it again, it works again.
But I don't understand why I can't do it properly. The
Show All Records macro should cancel all the filters and
allow me to use the filter again.

I use Access 2000 and it's not split.

Rosana
 
Rosana

We're not there, so we can't see your form, nor your code. You mentioned
"when I click the Show All ..." How does your macro/query "know" that
you've clicked it? Can you provide the SQL statement version of your query?
 
Back
Top