Requery or Refresh two forms

Sess

Registered User.
Local time
Today, 12:27
Joined
Jan 4, 2010
Messages
74
I have a continuous form that opens with a summary of information and I have placed a control on it which opens up a continuous form which shows a 'detail' of the information. On the detail form I want to be able to run an SQL to update some of the information in the data and then requery BOTH forms so the one that has focus will have correct data and the "summary" form will also reflect the current information from the database.
I have tried putting a requery after running the SQL to update the data but it seems that it is not working. I did search around and am confused, right now I am trying
Forms("frmDetails").Requery
Forms("frmSummary").Requery
but now I am wondering if it should be Recalc or Refresh or ???

Thank you.
 
Me.Requery 'requery form
Forms!YourForm!YourSubform.Requery 'requery subform
 
Thank you for answering. It is not a subform but a new form that opens for the detail. While proof reading I discovered that I did not include the double quotes around the form names within the brackets.

I had this
Forms(frmDetails).Requery
Forms(frmSummary).Requery

I should have had this
Forms("frmDetails").Requery
Forms("frmSummary").Requery

and now both forms have refreshed data when I do the OnClick event that contains both the SQL statement and my two requery statements.

Me.Requery 'requery form
Forms!YourForm!YourSubform.Requery 'requery subform
 

Users who are viewing this thread

Back
Top Bottom