Refresh form when another form is Saved

kobiashi

Registered User.
Local time
Today, 12:42
Joined
May 11, 2018
Messages
258
Hi

I have a form that creates records, and saves them in to a query.

i also have another form displaying the records in a continuous form.


how do i get the continuous form to refresh the data, once the first form is saved or updates.

here is my code i thought would work but doesnt

first form is called frm_Eng_MCU_NewEntry
second form the continuous form (the form i was to refresh), is called frm_Eng_Mcu_Tracker

Code:
Private Sub Form_AfterUpdate()
    If CurrentProject.AllForms("frm_Eng_Mcu_Tracker").IsLoaded = True Then
    [Forms].[frm_Eng_Mcu_Tracker].Requery
End If
End Sub
 
here is my code i thought would work but doesnt
How code fails matters. Does this raise an error? Maybe error 438, Object doesn't support this property or method? Or does it fail silently? Maybe it produces an incorrect result? Without knowing how it fails, we don't know enough about the problem to help very much.
hth
Mark
 
How code fails matters. Does this raise an error? Maybe error 438, Object doesn't support this property or method? Or does it fail silently? Maybe it produces an incorrect result? Without knowing how it fails, we don't know enough about the problem to help very much.
hth
Mark

thanks for the reply

it fails with error code 438

object doesnt support this property or method
 
That should be
Code:
[forms]![frm_Eng_MCU_NewEntry].requery
or

Code:
forms!frm_Eng_MCU_NewEntry.requery
 

Users who are viewing this thread

Back
Top Bottom