Error on cancelling a requery button

Uvuriel03

Registered User.
Local time
Today, 05:49
Joined
Mar 19, 2008
Messages
115
I have a form that I can search for parts in. It's based off of a query that asks you for a part name, then brings up all records with matching part names.

I have a button that says "New Search" with a Requery macro behind it. The problem is that when I hit "Cancel" on the button, I get an Action Failed box.

Action Failed
Macro Name: New Search
Condition: True
Action Name: Requery
Arguments: [blank]
Any ideas on what to do? I suspect I just need to be able to stop the macro if the query is canceled, but I don't know how best to go about doing this.
 
So do you have a text box on the form that you type the part name in and the query that the form is based on uses that text box as a parameter?
 
Nope, no text box. Just the parameter from the query that pops up before the actual form opens, and then the form opens to display the matching records. Then, I'd like to (hypothetically) be able to click on the "New Search" button to look for a different part than the one you initially typed in.
 
There are numerous ways to approach this. I think if you put the requery in code instead of using a macro you'll loose the Action Failed thing.
 
I don't know code very well... Do you have a reference site, or maybe just the code I'll need itself?

Thank you!!
 
Sorry to bail on you but it's quitting time. Maybe someone else can jump it?

:)
 
Anybody else have any input? I'm still stuck on this...

Thanks!
 

Users who are viewing this thread

Back
Top Bottom