Rerunning Filter On a Form (Access 97)

gregoryagu

Registered User.
Local time
Today, 12:01
Joined
May 7, 2009
Messages
29
I have an Accounts Form which the user opens after entering an account number. Then, when the user wants to record a payment, the user clicks a payment button which opens up the Payment Screen and sets the filter to the current account. (The payment data is actually part of the Account table). This all works fine.

I would like to add a button so the user can add another payment. To do this, I need to be able to rerun a query so that I can get the new account number from the user and refresh the screen with the newly found record.

How do I achieve that?

Thanks,

Greg
 
gregoryagu,

You can create a small form with an unbound text box on it where the use can type in the new account number. You will also need a command button on this new form that will close this form and apply the filter to the original form. You would most likely need a Cancel type button on this form so that if the user decides not to enter a new account number they can close the form without applying a new filter. To make sure that you get a value entered into the text box on the new form, I would suggest that when the form opens the Ok button (the one that applies the new filter) would be disabled. Then once an entry as been completed (use the After Update event of the text box) you can enable the Ok button. One more thing, you would also need to check to see that the Account Number provided was actually a valid account number before you attempt to filter the original form using it.

Add a button to your current form that will open this new form.

HTH
 
Thanks Doc!

Greg
 
Well, your welcome, Greg.

Good visiting with you today.
 

Users who are viewing this thread

Back
Top Bottom