please check this statement

keyur

Registered User.
Local time
Today, 07:56
Joined
Jun 22, 2004
Messages
41
hi

i want to get a value from a filed in the subform. i just cant get it to work. this is what i am using:

Sub update2()
MsgBox Forms!WorkGroups!EmployeesperWorkgroup.Form!FirstName
End Sub

Mainform Name: WorkGroups
Subform Name: EmployeesperWorkgroup
A control on the subform: FirstName (textbox)

the subform is in datasheet view.

This gives me error saying
"Runtime error '-2146500594(800f000e)':
Method "Form" of object "_Subform" failed."

Thanks
 
You can't reference a control when it's parent form is in datasheet view.
 
Thanks Ken, but i tried single view(which i dont want) as well as continuous view. but i get the same error.
 
gosh, i cant believe it could have been so simple.

just changed to
MsgBox Forms!WorkGroups!EmployeesperWorkgroup!FirstName

Thanks everyone
 

Users who are viewing this thread

Back
Top Bottom