I am trying to pass a variable from a Modal Form to a subform within a subform and unable to create the proper syntax. Subform "sfrProfiling" is contained within subform "Crafter Default" which is contained within "Main Form". I have a modal pop up with the name "sfrChangeProfilePics". I can create the variable without a problem, but cannot pass the varible value to the field "pic" on the subform "sfrProfiling'.The error says it cannot find the field.
These subforms are also in navigation subforms as well.
Update:
I am trying to pass a variable from a Modal Form (sfrChangeProfilePics), to a subform in a NavigationSubform (sfrProfiling), to a subform in a NavigationSubform (Crafter Default) which is in the main form (Main Form) and unable to create the proper syntax. My code works when they are simply a subform within a subform within the main form. As soon as I insert them into navigation control it doesn't work. My navigationSubform name is "NavigationSubform".
My code is as follows:
Public Sub Command4_Click()
Dim myProfiling As Recordset
Set myProfiling = CurrentDb.OpenRecordset("Profiling")
varChangePicture = Forms!sfrChangeProfilePics!FileName.value
DoCmd.Close
Forms![Main Form].[Crafter Default].Form!sfrProfiling.Form!pic.value=varChangePicture
End Sub
Forms!Mainform!Subform1.Form!Subform2.Form!ControlName
- Andre