subform issue

J

John

Hello, The below code works on a subform with its record source set to a
TABLE but will not work when the recode source is changed to a QUARY. The
quary uses the table that will work as will as some other tables. Any
suggestuions?

Sub Form_Current()
Dim strParentDocName As String

On Error Resume Next
strParentDocName = Me.Parent.name

If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![productmaster Subform].Requery
End If

Form_Current_Exit:
Exit Sub

Form_Current_Err:
MsgBox Err.Description
Resume Form_Current_Exit

End Sub

Thanks John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top