Results 1 to 8 of 8
  1. #1
    bfg is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2020
    Posts
    9

    Printing single record from form view


    Hi,

    I have a form which contains recorded dates when pupils successfully complete tasks. The form finds an individual pupils record via a combo box in the form header. I would like to print the individual pupils 'record' however the Print button I have used actually prints ALL pupil forms. I know technically prints should be done via a Report but I don't want to spend time re-creating the layout etc of the form if there is an alternative method to get just the active pupil's record printed out from the actual Form.
    Attached Thumbnails Attached Thumbnails PupilForm.JPG  

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,653
    Have you tried converting the form to a report?
    https://www.lifewire.com/access-2013...eports-1019897

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Have you tried:

    Code:
    DoCmd.RunCommand acCmdPrint
    I'm not sure if this will print just the current record or perhaps all the records. If it prints all records then try applying a filter to the form so that you only have the current record before using the print command.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    bfg is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2020
    Posts
    9
    Thanks for the suggestion Bob but it prints all records.

  5. #5
    bfg is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2020
    Posts
    9
    Form converts to report ok but still generates ALL pupils. Thanks for the suggestion Moke123, much appreciated.

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Quote Originally Posted by bfg View Post
    Thanks for the suggestion Bob but it prints all records.
    Even if you apply a filter to the form first?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,653
    use the docmd.openreport method and use the where condition to limit the records
    https://docs.microsoft.com/en-us/off...cmd.openreport

  8. #8
    bfg is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2020
    Posts
    9
    Now I feel really dumb ... I am now able to print the single selected record by clicking on the 'Print Pupil Record' button and from the printers options 'Print Range' ... 'Selected Records'. I was so engrossed in trying to find an Access solution I missed the blatantly obvious staring me in the face! Thanks for being so prompt in responding to my call for help... I promise to try and get my brain in to gear next time before I call for help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Printing single record from Listbox
    By Benzer420 in forum Access
    Replies: 3
    Last Post: 08-17-2015, 02:48 AM
  2. Report printing a single record
    By gebmiller1984 in forum Access
    Replies: 5
    Last Post: 01-15-2015, 03:47 PM
  3. Replies: 2
    Last Post: 09-10-2014, 08:48 AM
  4. Replies: 1
    Last Post: 05-31-2013, 11:02 AM
  5. Printing a single record in a report
    By kelann in forum Reports
    Replies: 28
    Last Post: 10-04-2012, 10:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums