Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Posts
    14

    Unanswered: How to print a record based on currently selected form - Help Plzzz, Thanks in advanc

    How to print a report based on the selected form. I have looked up on net,
    DoCmd****nCommand acCmdSaveRecord
    DoCmd.OpenReport "Consultation Card", acViewPreview, , "[Out PatientID] = " & [Out PatientID]
    the nearest I could come to was that I have a button,which when clicked opens the report with the selected form, but I still have to "Ctrl+P" and Ok to print. Is it some how possible to cut short these two steps and print the selected record based report with one button command on the active form.....I've seen you guys giving really good and useful advise on many topics, I would be only too grateful if I caould find some help , Thanks in Advance

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    The "acViewPreview" is telling the report to open in preview mode. Delete that and it will print to the default printer.
    Paul

  3. #3
    Join Date
    Sep 2010
    Posts
    14

    Thanks paul

    Thanks a lot paul, that did it,,,,,,it was very helpful;

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help, and welcome to the site by the way.
    Paul

Posting Permissions

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