Results 1 to 9 of 9
  1. #1
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77

    Printing a form, corresponding to a single case file

    I've a database of cae files, and I use Access to derive and present information from it.

    I've a wish to be able to print a paper form of some of the data.

    My data is organised around case files called Transports.
    To each Transport, an amount of data is connected in various other tables.
    I have made myself a view, where I can view the Transpotr and all the data related to that transpotr, by means of a number of sub-forms, incorporated into the main form.


    I can search for a given case number, and the form with subforms will show me the case and realted data to that case in the subtables.
    This works satisfactorily. I have gotten all the tables straight and can process data just fine.

    Now, I wish to print the form of a given case. I want a paper showing me the data related to a specific case which I call up to the screen via the search function.
    BUT, problem is, when I attempt to print the case, it prints ALL the cases. Even though the screen only shows me the requested case.

    How can I tell access to print the form of a specific case?

  2. #2
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77
    Replying to my own with a change of original question:
    I see now that I can change print area from "everything" to "only marked space" (sorry about my english), and this solves it. Now only a single case file is printed.
    BUT, still there is a problem: This requires for the caseworker to change the print area every time a case is printed, in order to not get everything at the same time. I see a big factor of human error here.
    Is it possible to set access print settings to a default mod where only the marked case (i.e. what is shown on screen) is printed?

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    If English is not your native language, then
    -write your question in your native language,
    -open Google Translate,
    -copy your question to Google Translate
    -select translate to English
    -copy and past the translated text to your post.

    It would be helpful if you would post a copy of your table designs, and your relationships window.
    Readers need to understand your tables and how they relate to one another.

    This is confusing as written:
    This requires for the caseworker to change the print area every time a case is printed, in order to not get everything at the same time. I see a big factor of human error here.
    Depending on your table relationships, you should be able to select and then print info about a single Transport and all info related to that single Transport. As usual the devil is in the details.

    Here is a link to an article on printing a single record that may help.

    Good luck.

  4. #4
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77
    This sums it up:

    Click image for larger version. 

Name:	print.png 
Views:	21 
Size:	12.7 KB 
ID:	39874

    When wanting to print, I get to choose between three radio buttons, one is to print everything, two is a defined number of pages, and three is selected record only (marked with an orange arrow in picture).
    I need the third option to become the default when choosing to print.
    Of course, i can choose via the radio button each time time I print, but this is prone to human error. I need to print a lot of single records that way.
    Can I setup Access to have the third print option as the default?
    Attached Thumbnails Attached Thumbnails print.png  

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    If you look at the properties of the frame(udskriftsområde), I think you will find that Alt is the current default value.
    It may be option 1. To get selected item (markerede poster), you'll have to change the default value (probably 3), but I don't have access to your code or an image of the property settings.

    For others who may read this thread:
    Danish
    alt ,sider, markerede poster
    antal kopier
    udskriftsområde

    English
    everything, pages, selected items
    number of copies
    print area

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    English
    Ummm. You do know that forms are for viewing, adding, editing and/or deleting data??
    Reports are for printing. So you should develop a report.

    --------------------------------------------------------------
    Danish
    Ummm. Du ved, at formularer er til visning, tilføjelse, redigering og/eller sletning af data??
    Rapporter er til udskrivning. Så du bør oprette en rapport.

  7. #7
    Nanuaraq is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Mar 2017
    Posts
    77
    @orange Yes, I'm trying to change the default value to "print area" (thanks for the translation). That is my qwuestion, how do I change the default value in the print setup?

    @ssanfu I have no experience with reports and a form works fine for this purpose. Except for the default print value. Actually, I tried using a report but the first problem I encountered was that the report lists all the records. I am trying to make a report that lists only the contents of one single record.

  8. #8
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    You can open the report filtered to the current record, print to pdf then close it automatically all in vba - this is the easiest way to achieve your result.

    https://www.access-programmers.co.uk...d.php?t=307155 has some example code, and there is loads of other examples on here as well.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Did you read the article I linked to in post #3? It uses a button on the form, but opens a report with the identifier of the single record to be printed.

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

Similar Threads

  1. Printing out a single form
    By Lou_Reed in forum Access
    Replies: 4
    Last Post: 12-12-2016, 01:03 PM
  2. Printing a single form
    By BRZ-Ryan in forum Forms
    Replies: 1
    Last Post: 12-05-2013, 10:17 AM
  3. Replies: 3
    Last Post: 04-17-2013, 07:04 PM
  4. Replies: 13
    Last Post: 11-07-2012, 03:14 PM
  5. Printing a single report from form
    By OFA in forum Forms
    Replies: 9
    Last Post: 06-08-2010, 09:27 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