brendoaccess
Technical User
I have a form frmPerson, with FirstName and Surname fields, with tabs. On a tab called Home Details I have a sub form, "frmHomeDetails" with fields Address1, Address2, etc.
I have an on click bit of code to send field contents to book marks in Word - which works, until it comes to referencing the fields on the subform.
This works:
.Selection.Goto What:=wdGoToBookmark, Name:="Surname"
If Not IsNull(Me.Surname) Then
.Selection.TypeText CStr(Me.Surname)
End If
This doesn't:
.Selection.Goto What:=wdGoToBookmark, Name:="Address1"
If Not IsNull(Me!frmHomeDetails.Form!Address1) Then
.Selection.TypeText CStr(Me!frmHomeDetails.Form!Address1)
End If
I have looked at and tried all the combinations on there with Me. Me! in all the combinations possible.
All help greatly appreciated.
I have an on click bit of code to send field contents to book marks in Word - which works, until it comes to referencing the fields on the subform.
This works:
.Selection.Goto What:=wdGoToBookmark, Name:="Surname"
If Not IsNull(Me.Surname) Then
.Selection.TypeText CStr(Me.Surname)
End If
This doesn't:
.Selection.Goto What:=wdGoToBookmark, Name:="Address1"
If Not IsNull(Me!frmHomeDetails.Form!Address1) Then
.Selection.TypeText CStr(Me!frmHomeDetails.Form!Address1)
End If
I have looked at and tried all the combinations on there with Me. Me! in all the combinations possible.
All help greatly appreciated.