Refreshing data of a subform

latex88

Registered User.
Local time
Today, 10:19
Joined
Jul 10, 2003
Messages
198
I’m having problems getting a subform to reflect the current data. I would like to, in an event procedure, refresh the data in the subform that is in a form. The subform does not display current data unless I close and open the form or go to the design view and back to the form view manually. I thought I just write codes to open and close the form to refresh the data, although it’s probably not an efficient way to do it, it does not seem to work either. I literally must manually close it and open the form or go to the design view back to the form view to get the data in the subform to display the current data. I know there’re methods, such as “refresh” and “requery”, but somehow I’m not sure I’m doing wrong because it does not work. What is the trick:confused:
 
A little more information, please.
How are the Form and subForm related? Why is the Parent Form or subForm changing?
Is the data in the subForm being changed by another user?
 
The are not related at all. I'm sure there's a better way, but I'm just using the subform to dispay some information for the user to see.
 
Usualy, the sub is related to the Parent so they will stay in Sync.
How will the user know if the subFrom is not showing the right data?
You could make the Navigation Buttons visible as a way to allow selecting rcords he needs to see. Or, You could try putting another subForm and nesting the original subForm within it. Provide a combo box or someother method of selecting the right record.
 
latex88, you can try using the "on current" property of the subform using:


Me.YourField = Forms!frmMainFormName!YourField

Me.YourField = name of field on the subform
Forms!frmMainFormName!YourField = name of field on main form
 

Users who are viewing this thread

Back
Top Bottom