Creating a search command

Steve67

Registered User.
Local time
Today, 08:00
Joined
Oct 2, 2007
Messages
21
I have a table that was set up from a parameter query. Before the form opens it ask you for a part number. You type in the part number you want the information for and the form pops up to that particular part number. The problem that I am having is that if I want to move to another part number I have to close out the form and reopen it to type in another part number. I tried using the Access Find/Replace feature to do a search for a another part number to open up the information to that part number and I have even tried to create a command function that will do a search, but when I use them they both come up with no records found.

Is there a way to make a search function in a form created from a parameter query? I am not a script writer and am just really getting indepth with Access at the moment.

Thanks
Steve
 
The problem that I am having is that if I want to move to another part number I have to close out the form and reopen it to type in another part number.Is there a way to make a search function in a form created from a parameter query?
Sure there is. Just put a button on the form that will allow you to enter the new value and refilter the form....
Code:
Private Sub button_OnClick
  
  me.requery

End Sub
 
That did the job and an easy solution... thanks a lot. But I have a problem when I try to cancel the operation. I get a visual basic error

"Run-time error 2001"

You cancelled the previous operation
 
Never mind.. I figure out what the problem was.. thanks a lot once again
 

Users who are viewing this thread

Back
Top Bottom