updating / refresh forms

hullstorage

Registered User.
Local time
Today, 21:23
Joined
Jul 18, 2007
Messages
213
i currently have say a main form with all my deliveries on them
and then i have a button a top to create a new delivery

but at the minute i have to create these events to refresh it:
( i dont really want to create a button that i have to keep pressing to refresh )

close main form
open delivery form

once delivery has been inputed then

close delivery form
open main form

the main form is basically my startup form
with all deliveries entered

any help
thanks
 
In the AfterUpdate event of the button or whatever requery the control that displays your records i.e. me.listboxname.requery
 
There are two ways to overcome your problem
Note if the Main form is closed the requery will generate an error
because the form will not be accessible
To overcome this problem copy the isloaded function from the Northwind sample database to a module in your database.
Then in the after update event of the control you use to requery the main form after a new entry put this

If IsLoaded("YourMainForm") Then
Forms("YourMainForm").Form.Requery
End If

The other is not close the form and just requery the main form from your data entry form.You can use the save button.
Cheers
 

Users who are viewing this thread

Back
Top Bottom