Problem with refresh data when splitting database

barkarlo

Registered User.
Local time
Today, 20:54
Joined
Feb 11, 2013
Messages
46
In the database I have a main form with subform "frmitinerer" . Using a button on the main form open form "frmrelation." After entering the new daily haul and closing forms refresh the data in the subform "frmitinerer."
Code on the button is on click event
Code:
[FONT=Verdana][COLOR=#222222][COLOR=#465584][FONT=Courier]Docmd.openform "frmrelation" acnormal[/FONT][/COLOR][/COLOR][/FONT]
[FONT=Verdana][COLOR=#222222][FONT=Verdana][COLOR=#222222]Me.frmitinerer.requery[/COLOR][/FONT]
 
[/COLOR][/FONT]


All work nice, but when I splitting the database refresh subform not working.
What is the problem and how to solve it?
 
You seem to be requerying the subform to early to capture the new data.

In the OnClose event of the form "frmrelation", use the following code.

Forms!yourmainformname!frmitinerer.requery
 
I tried this, but without success.
I also made a form that opens the dialog mode and still nothing.
I tried it in the event "on close" forms "frmitinerer" the code, and again nothing.
Code:
Forms! FrmMainformname! FrmSubformControlName.requery.
I temporarily solved the problem so I'm in the button "close" to the form Frmrelation
introduced two lines:
Code:
Private Sub Command6_Click ()
DoCmd.Close
DoCmd.Close acForm, "frmqueryrastertura" acSaveYes
DoCmd.OpenForm "frmqueryrastertura"
end Sub
 
If you want to revisit this try the code
Forms!yourmainformname!frmitinerer.requery
in the OnExit event

If that doesn't work try
Forms!yourmainformname!frmitinerer.refresh

Sometimes when requery doesn't work refresh might.
 
I tried everything and still nothing.
Thank you for your help and patience.
 

Users who are viewing this thread

Back
Top Bottom