Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    83

    Unanswered: Updating before a print

    I've got a button to print the current record on one of my forms, the problem is that if the user hits print and does not click the next or prev record buttons the printed form comes out blank.

    Is there a way to force that data into the table before the DoCmd.OpenReport is called?

    Thanks

  2. #2
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    You may want to try just closing the form (hence saving the data to the table) before running the report.

    like so...

    Code:
    docmd.close acform, "yourformname"
    docmd.openreport "yourreportname"
    Hope that helps you,
    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  3. #3
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271
    I had the same issue. I tried requery, save record, and nothing worked for me. I know this is stupid but I ended up creating a macro that goes to the previous record then to the next record to bring you right back to the record your on.
    It's dumb but it works!

    Michael
    Gotta to do some code

  4. #4
    Join Date
    Mar 2004
    Posts
    83
    Well I've got the report set to acViewNormal so it will just fire off to the default printer. There has got be be some way other than closing a form (which would lose the position in the record), or macroing to the prev record (which flickers, but a good suggestion). Is there no commit style function?

  5. #5
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271
    You can keep it from flickering using Echo...Off in your macro. Once you create this you could convert your macro to code??

    Just a thought,
    Michael
    Gotta to do some code

  6. #6
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    I am sure you could convert it to code. I dont really see the need if you have a perfectly good macro :P but... I will try and get back with you on the code that would be needed to do it by the code instead of macro (I would rather use code too).

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

Posting Permissions

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