0
votes

I have a problem with refreshing a subform from another form in navigation form Here it is:

I have a form called MainForm in it is one sub form called MainSubForm.. From the link in a row in MainSubForm if you click it will open the third form like popup called ClientForm that will show the details of client on row selected on MainSubForm. Till here is everything ok, but in popup ClientForm form I have to edit some data, clos ClientForm and refresh the MainSubForm. My code in ClientForm is like this:

Forms.MainForm.MainSubForm.Form.Requery

DoCmd.Close

When I open the MainForm normally it is work perfect, but when I open the MainForm form from my Navigation Form it is not working.

Info: I have navigation form that I put all my forms that i needet in there ( MainSubForm not in navigation form )

Thanx in advance,

1
I am confused. MainSubForm is or is not embedded in Navigation form? By open 'normally' you mean as standalone form? What do you mean by 'open the MainForm form from my Navigation Form' - there is code in Navigation Form to open MainForm (show code)? MainForm is NOT a Navigation Form? Images might be helpful.June7
1.Yes, MainSubForm is embedded in MainForm and this two together in Navigation form. 2. By open 'normally' you mean as standalone form? Yes I mean when I open MainForm from Forms in access 3. What do you mean by 'open the MainForm form from my Navigation Form I mean when I open MainForm from tab on navigation form. 4. MainForm is NOT a Navigation Form i was my mistake, I wanted to say ClientForm is not in navigation form but it is no sot important. ThanxIngis
So MainForm is actually located on the tab of a Navigation form named Navigation Form? in which case MainForm is no longer a 'main form'. And then MainSubForm is a subform on Main Form? Could really give forms better names. Again, pictures might help. Edit your question.June7
OK I will try to be more specific 1. So MainForm is actually located on the tab of a Navigation form named Navigation Form , Yes exactly, but tab name is Tikets but it doesn't matter. In this tab also is SubForm (MainSubForm) embedded in MainForm. So when I cliclk in SubForm in a row named "Edit" ,it will open one PopUp Form called ClientForm, after in popUp ClientForm I made some changes and save and clos ClientForm and I need also to requere (refresh) SubForm (MainSubForm) to show the changes what I made in ClientForm.. That is ALLIngis
Then if MainForm is now embedded on another form object, of course the referencing must change to include that form (Navigation Form). Why don't you just do client edits on the subform instead of opening up a popup form?June7

1 Answers

0
votes

If you retain the default names assigned by Access (Navigation Form and NavigationSubform), the following should work to requery form/subform placed on Navigation Form (it does for me).

Forms![Navigation Form].NavigationSubform.Requery