F
frank
Hello,
I have a unbound main form that contains a list box and a
sub form (frmMedia). The sub form also contain a sub form
(frmMediaSubForm)that has its link child and master fields
set. When a selection is made from the list box, the
record source for the sub form is changed displaying the
information selected from the list box.
If a selection from the list box is double clicked then
another form is opened (frmMediaEdit):
DoCmd.OpenForm "frmMediaEdit", , , "MediaID=" & Me.lstMedia
Here's the problem. When I close frmMediaEdit from a
button on the form the sub form "frmMediaSubForm" shows
#Error when making selections from the list box again.
However, If I close frmMediaEdit using the close icon "X"
then selections from the list box shows the details in
frmMediaSubForm just fine.
Any ideas as to what is causing this? There are no events
being triggered when closing frmMediaEdit. I've also
tried
Thanks in advance!!!
Here is the code behind the close button on frmMediaEdit:
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click
DoCmd.Close
Exit_cmdClose_Click:
Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click
End Sub
I have a unbound main form that contains a list box and a
sub form (frmMedia). The sub form also contain a sub form
(frmMediaSubForm)that has its link child and master fields
set. When a selection is made from the list box, the
record source for the sub form is changed displaying the
information selected from the list box.
If a selection from the list box is double clicked then
another form is opened (frmMediaEdit):
DoCmd.OpenForm "frmMediaEdit", , , "MediaID=" & Me.lstMedia
Here's the problem. When I close frmMediaEdit from a
button on the form the sub form "frmMediaSubForm" shows
#Error when making selections from the list box again.
However, If I close frmMediaEdit using the close icon "X"
then selections from the list box shows the details in
frmMediaSubForm just fine.
Any ideas as to what is causing this? There are no events
being triggered when closing frmMediaEdit. I've also
tried
Thanks in advance!!!
Here is the code behind the close button on frmMediaEdit:
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click
DoCmd.Close
Exit_cmdClose_Click:
Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click
End Sub