Sean O'Halloran
Registered User.
- Local time
- Today, 14:48
- Joined
- Dec 25, 2002
- Messages
- 52
I've searched for two hours here but can't find the answer on how to do this:
My problem: Trainees get certificates when they complete a class. We print out certificates that say:
"Joe Schmegacki attended 'How to Swim with Sharks' with the trainers Capt. Ahab, Mr. Jonah, Dr. Cousteau."
I'm attempting to get the trainers' names to display and print as if they are part of the paragraph, and I'm getting close: In my forum search I came across this link to a Microsoft article, which shows how to do that for ONE instance of the report:
http://support.microsoft.com/default...b;en-us;141624
I followed the instructions and created the report (adjusting the code to fit my field names), and that subreport works for the first trainee certificate (the mainform). The second trainee certificate gets 'Capt. Ahab, Mr. Jonah, Dr. Cousteau, Capt. Ahab, Mr. Jonah, Dr. Cousteau', and so on, doubling on each new certificate.
In teh code below ALLTRAINERS is and unbound text box, FULLNAME is bound to field which concatenates the trainer's title and first and last names.
Here's the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Local Error GoTo Detail_Format_Err
If Not FirstPass Then
Me!AllTrainers = Me![FullName]
FirstPass = True
Else
Me!AllTrainers = Me!AllTrainers & ", " & Me![FullName]
End If
End Sub
Could somone please help me with advice on how to amend the code, or point me in the right direction? Thanks in advance for your help,
Sean
My problem: Trainees get certificates when they complete a class. We print out certificates that say:
"Joe Schmegacki attended 'How to Swim with Sharks' with the trainers Capt. Ahab, Mr. Jonah, Dr. Cousteau."
I'm attempting to get the trainers' names to display and print as if they are part of the paragraph, and I'm getting close: In my forum search I came across this link to a Microsoft article, which shows how to do that for ONE instance of the report:
http://support.microsoft.com/default...b;en-us;141624
I followed the instructions and created the report (adjusting the code to fit my field names), and that subreport works for the first trainee certificate (the mainform). The second trainee certificate gets 'Capt. Ahab, Mr. Jonah, Dr. Cousteau, Capt. Ahab, Mr. Jonah, Dr. Cousteau', and so on, doubling on each new certificate.
In teh code below ALLTRAINERS is and unbound text box, FULLNAME is bound to field which concatenates the trainer's title and first and last names.
Here's the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Local Error GoTo Detail_Format_Err
If Not FirstPass Then
Me!AllTrainers = Me![FullName]
FirstPass = True
Else
Me!AllTrainers = Me!AllTrainers & ", " & Me![FullName]
End If
End Sub
Could somone please help me with advice on how to amend the code, or point me in the right direction? Thanks in advance for your help,
Sean