Parnet problem with subform

Massoud

Registered User.
Local time
Today, 23:25
Joined
Jul 11, 2002
Messages
37
Hi,

In my subform's oncurrent event I want to change the value of a text box (docid) on the main form.
The name of the subform is : AsnadList
This code doesn't work:

Private Sub Form_Current()
Me.Parent.docid = Me.DocumentId
End Sub

I keep receiving this error message:
Method 'Parent' of object '_Form_AsnadList" failed

What's the problem?
Thanks
 
Use this notation

Forms!YourMainFormName!DocumentID

to refer to the document id
 

Users who are viewing this thread

Back
Top Bottom