Hi all,
I am not understanding what I need to do here. I have a procedure on Format that 'should' decide which name to pass to the first line of a report (txtLine1). However, if I define txtline to have a few fields in it, then regardless of what I write in the procedure, it will print what I selected. So I do I go about getting the procedure to return the correct text in txtline1? Thanks for your help
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim strName As String
If Me!Married = -1 Then
strName = "[tblparent].[first name]&' '&[tblparent].[last name]&' & '&[tblparent_1].[first name]&' '&[tblparent_1].[lastname]"
Else: strName = "[tblparent].[first name]&[tblparent].[last name]"
Me!txtLine1 = strName
End If
End Sub
I am not understanding what I need to do here. I have a procedure on Format that 'should' decide which name to pass to the first line of a report (txtLine1). However, if I define txtline to have a few fields in it, then regardless of what I write in the procedure, it will print what I selected. So I do I go about getting the procedure to return the correct text in txtline1? Thanks for your help
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim strName As String
If Me!Married = -1 Then
strName = "[tblparent].[first name]&' '&[tblparent].[last name]&' & '&[tblparent_1].[first name]&' '&[tblparent_1].[lastname]"
Else: strName = "[tblparent].[first name]&[tblparent].[last name]"
Me!txtLine1 = strName
End If
End Sub