Results 1 to 4 of 4
  1. #1
    Niclas is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2020
    Posts
    2

    Changing form for printing.

    Hi all



    I admit that this is driving me crazy, but I guess there is an easy solution to it.

    I have a database with work orders, and in this database I have two different forms.
    One form is for working on the screen, and the other one for printing the work order on a printer.

    What I would like to do is:

    You scroll through your work orders with the screen form and when you find the order you are looking for, you click a button for printing the order and then Access switch form to the printing form and sends it to the printer.

    The problem I have:

    I have made a button that marks the post that I am looking at in the screen form, and then prints the marked post. This works without any problem.
    The problem is that when I add a step where I change the form, Access drops the marking and prints out all work orders.

    I hope you understand what I mean, and have an easy solution for me.

    Thanks for your help

    /Niclas

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Use a report for the printout. Use the same data source that you use for the form. Use the button on the form to send the report to the printer.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Niclas is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2020
    Posts
    2
    Hi Bob

    Thanks for your answer, but I still seems to get all posts in the report and not just the one I want to print.
    Is there a way of limiting the report to only the post I am looking at with my screen form?

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Try:
    Docmd.OpenReport "[YourReportName]",acViewNormal, , "[NameOfIDFieldInTable] = " & Me.NameOfIDControlOnForm

    Replace the names in BOLD with your actual names.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 4
    Last Post: 04-17-2019, 03:51 AM
  2. Replies: 2
    Last Post: 03-22-2019, 05:35 PM
  3. Printing issue form a form (MS Access 2010)
    By gutenberg in forum Forms
    Replies: 7
    Last Post: 06-23-2016, 12:47 PM
  4. Replies: 1
    Last Post: 02-29-2012, 09:38 AM
  5. Replies: 1
    Last Post: 08-19-2011, 02:53 PM

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