G
Guest
I have the following code on a form:
Dim strField As String
'Evaluate which option button was selected
'Set the comment box recordsource as appropriate
Select Case optCriteria
Case 1
strField = "Comments" 'name of field in underlying query
Case 2
strField = "CommentsShare"
Case 3
strField = "CommentsMgmt"
Case 4
strField = "CommentsConfid"
End Select
Me.Visible = False
DoCmd.OpenReport "rptMemoReport", acViewPreview, OpenArgs:=strField
In the Open event of the report, I have:
If Not IsNull(Me.OpenArgs) Then
Me.txtComments.ControlSource = Me.OpenArgs
End If
Works great as is. What I would like to add is the option to combine the
various comments on the report. For example, allow the user to have the
"comment" field on the report contain both general and confidential comments.
On the form, I've tried strField = "Comments" & "CommentsConfid" which
didn't work.
These fields are in a "master query" I use as support for several reports.
For this report, all I want to change is the comments that print.
Is there a way to concantenate the fields on the report?
Thanks!
Dim strField As String
'Evaluate which option button was selected
'Set the comment box recordsource as appropriate
Select Case optCriteria
Case 1
strField = "Comments" 'name of field in underlying query
Case 2
strField = "CommentsShare"
Case 3
strField = "CommentsMgmt"
Case 4
strField = "CommentsConfid"
End Select
Me.Visible = False
DoCmd.OpenReport "rptMemoReport", acViewPreview, OpenArgs:=strField
In the Open event of the report, I have:
If Not IsNull(Me.OpenArgs) Then
Me.txtComments.ControlSource = Me.OpenArgs
End If
Works great as is. What I would like to add is the option to combine the
various comments on the report. For example, allow the user to have the
"comment" field on the report contain both general and confidential comments.
On the form, I've tried strField = "Comments" & "CommentsConfid" which
didn't work.
These fields are in a "master query" I use as support for several reports.
For this report, all I want to change is the comments that print.
Is there a way to concantenate the fields on the report?
Thanks!