Results 1 to 2 of 2

Thread: Print a Report from a Form

  1. #1
    Join Date
    Aug 2009
    Posts
    1

    Print a Report from a Form

    I'm in over my head. I hope I don't offend anybody with my ignorance. I use access 07 to manage my equipment maintenance. I have it generate a report when a piece of equipment goes to surplus. I first open a form that the user can input the condition of wearable items and other present condition data. The form is then closed and the report ran separately.

    The Form Record Source “Surplus Equipment Form” is a query of 2 tables joined. One table is for the present condition data and the second table is the build data of the piece of equipment that is completed when the equipment is purchased. The query prompts for the “DOT No” which is the primary key of both tables and is the joint.

    The Report named “Surplus Equipment Evaluation” uses the same query for its record source.

    I need the code to put behind a Print Preview button on the Form that would preview the report without being prompted for the “DOT No” again. Is this possible? I realize that I will need to change the record source for the report so it doesn’t prompt for the “DOT No” when ran.

    I know just enough about MS Access to be considered dangerous.

    Thanks in advance

    Don K.

  2. #2
    Join Date
    May 2006
    Posts
    407
    There will be a ton of different ways to do this. The one that I would use is a form that would ask for the number, then this form would be set to Visible = False, but your DOT No would still be accessible on this form. (Forms!YourFormName!DOTno). That actual verbiage can be put into the query (your form and report record source) and thus allow both the form and report to be able to use this DOT No. Be sure that the form or the report closes this now hidden form when they close.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •