Ok everyone, this could be something simple but it seems to be eluding me.
It sounds really complicated but please try to follow. The main form is Log details. The main form contains three tabs in which I have placed 3 sub forms. One of the tabs displays part information. On the parts tab sub form I have a button that opens the "Remove Parts" pop up form. On the pop up form I have a submit button which saves the record and closes the form.
Thus far all the code works and I am not getting any errors, but I'm also not getting the results that I want. After the pop up closes I would like to reset the focus back to the Log Details form with the new removed part entry now showing in the sub-form.
I tried a form refresh after I reset the focus but it won't refresh the list unless I click on refresh all.
+++++++++++++This is the code from the pop up+++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++
***************** Here is the code from the parent form***********
***********************************************************
Any ideas?
Thanks in advance.
It sounds really complicated but please try to follow. The main form is Log details. The main form contains three tabs in which I have placed 3 sub forms. One of the tabs displays part information. On the parts tab sub form I have a button that opens the "Remove Parts" pop up form. On the pop up form I have a submit button which saves the record and closes the form.
Thus far all the code works and I am not getting any errors, but I'm also not getting the results that I want. After the pop up closes I would like to reset the focus back to the Log Details form with the new removed part entry now showing in the sub-form.
I tried a form refresh after I reset the focus but it won't refresh the list unless I click on refresh all.
+++++++++++++This is the code from the pop up+++++++++++++
Code:
Private Sub cmd_submit_Click()
DoCmd.Save
DoCmd.Close
Forms(frm_Prt_Monitor).SetFocus
End Sub
***************** Here is the code from the parent form***********
Code:
Private Sub Form_GotFocus()
Me.Form.Refresh
End Sub
Any ideas?
Thanks in advance.