Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SAVE AND PRINT - NBS

    SAVE AND PRINT - NBS

    Using Access 2000 (9.0.4402) SR-1

    I have a form that gets filled out when a record is added, when finished, the operator presses a print button and the report prints a single record OK with the following VBA code:

    strFilter = "[lngBPermitID]=" & Me!lngBPermitID
    DoCmd.OpenReport strDocName, acPreview, , strFi

    During another session, when I make a change to this record and repeat the print process, the changes don't show on the report.

    The changes will show if I manually do previous/next record.

    What is the proper way to have changes reflect in the report when a record is maintained?

    Thanks, John Graves

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SAVE AND PRINT - NBS

    I believe that is because the record is only being saved when you move to another record. Try adding the code

    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

    after you change the record and before you print the report.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    NYC,USA,Earth
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SAVE AND PRINT - NBS

    Try placing this line before the openreport line:

    DoCmd.RunCommand acCmdSaveRecord

Posting Permissions

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