INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Report header text boxes fill in acViewPreview but not in acViewNormal

Report header text boxes fill in acViewPreview but not in acViewNormal

Report header text boxes fill in acViewPreview but not in acViewNormal

(OP)
My report header must contain text in a number of text boxes (mAanleiding, mAuditor etc.) filled from fields in an open form linked to a table:

CODE

Private Sub Report_Load()
Me.Caption = "Toezegging" & Str(Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mNummer_i)
Kop.Caption = "Toezegging" & Str(Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mNummer_i)
mAanleiding = Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mAanleiding
mAuditor = Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mAuditor
mAntwoord = Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mAntwoord
mAfsluiting = priAfsluiting
Voet.Caption = "Afdruk: " & Format(Now, "dd mmmm yyyy hh:mm")
End Sub 

This works fine in print preview, but if I sent the report directly to the printer the text boxes are empty.

If I open the report with acViewPreview, and then with acViewNormal, the printed version does contain the content of the text boxes, but this is not practicable, as my form is modal, and I want to browse in it to another record and then print another report based on the then current record.

Later: I can also get acViewNormal to work by filling the text boxes from the Details_Format event instead of the Report_Load event, but that does not seen very elegant, as that will, I assume, fire for each record in the report.

RE: Report header text boxes fill in acViewPreview but not in acViewNormal

I would add the code to the On Format event of the section of the report containing the controls.

Do you have any code that closes the form at any time?

Duane
Hook'D on Access
MS Access MVP

RE: Report header text boxes fill in acViewPreview but not in acViewNormal

(OP)
>I would add the code to the On Format event of the section of the report containing the controls.

Yes indeed; this works fine; thank you

>Do you have any code that closes the form at any time?

No; the calling form checks for available data to report

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close