Results 1 to 3 of 3

Thread: Refreshing Data

  1. #1
    Join Date
    May 2003
    Location
    Kansas City, KS
    Posts
    3

    Post Unanswered: Refreshing Data

    I'm working on this database that allows a print option for the users. The print button is located on the form, but I'm having some problems in regards to the print preview. When the user clicks on the print button, the report is print previewed.

    Okay, so when a user enters a new record and clicks the print button, the user receives an error. It says:
    "Run-Time error '2427':
    You entered an expression that has no value."

    However, when I click on the refresh button located on the form, which updates the data, I can preview with no problem and no error. Some of the users are wondering if it is possible to print preview w/o having to refresh the data?

  2. #2
    Join Date
    Dec 2001
    Posts
    79
    Try putting a

    Me.Refresh

    ... just ahead of your OpenReport method in the button OnClick event procedure. Ex.

    Me.refresh
    Docmd.OpenReport ...

    You might also want to save the current record prior to opening the report... Ex.

    DoCmd.RunCommand acCmdSaveRecord
    Me.Refresh
    DoCmd.OpenReport ....

    Hope this helps,
    Peter De Baets
    Peter's Software - Microsoft Access Tools for Developers
    http://www.peterssoftware.com

  3. #3
    Join Date
    May 2003
    Location
    Kansas City, KS
    Posts
    3

    thanks

    Thanks, your reply helped a lot.

Posting Permissions

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