• SAVE AND PRINT – NBS

    Author
    Topic
    #356682

    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

    Viewing 1 reply thread
    Author
    Replies
    • #528378

      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.

    • #528487

      Try placing this line before the openreport line:

      DoCmd.RunCommand acCmdSaveRecord

    Viewing 1 reply thread
    Reply To: SAVE AND PRINT – NBS

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: