help with SourceObject

CAP101

Registered User.
Local time
Today, 01:00
Joined
Mar 18, 2001
Messages
20
I am trying to set the source object in VBA for a subform control on a form. I have tried this code but access says it cant find the form. Any help would be much appreciated!

Dim objMaterials As Object
objMaterials = [Forms]![sfrmPODetailsMaterials]

Me![sfrmPODetails].SourceObject = strMaterials
 
Try

forms![MainFormName]![subFormName].setfocus
 

Users who are viewing this thread

Back
Top Bottom