Results 1 to 7 of 7
  1. #1
    GodBlessNY is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    9

    Question on Database processing and printing

    Hello fellow users:
    I used to write code using higher level languages. I just recently started to familiarize myself with Access2010. Here is what I am trying to do:
    I have a preprinted form:
    My thought process is this:
    Get a client (record one from the query that has a unique field)
    create a subroutine to print the top third of the page for client1


    Print items on the middle portion of the page
    If items are greater than 5, then do a subroutine that prints the bottom third of the page and jump to a new page
    Call the first third routine again for the first third of the page to be printed
    Continue printing the rest of the items (as long as it does not exceed 5 lines, otherwise, print a third page and repeat)
    Do subroutine to print bottom third of page
    Get the next client# and start the process again until the end.

    Can this be done? And please, tell me how? In other words, can I open a query and read a record at a time and do the above until a new client?
    I understand programming concepts I just do not know Access well. I'm a newbie.

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    just create a report - see this link about how to do that

    https://support.office.com/en-us/art...5-7158dcd3681c

    you have a variety of different sections - page headers/footers, group headers/footers

    I open a query and read a record at a time and do the above until a new client?
    you design a report which references a query. You appear to be describing a document like a multipage invoice - a very common requirement, nearly every business using access needs one of those

    'tell me how' is like asking 'tell me how to service my car' - much too broad a question. Best I can say is google 'access reports' and find links like the one above or look on youtube - there are plenty about. Or download one of the templates (northwind is a perennial favourite) for some examples. Or look to the bottom of this thread where you will find links to similar questions

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Ajax, that was my first thought too, just so he could line up the report with the document. But he has a pre-printed form he wants to print database records on to.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    GodBlessNY is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2016
    Posts
    9
    Quote Originally Posted by Micron View Post
    Ajax, that was my first thought too, just so he could line up the report with the document. But he has a pre-printed form he wants to print database records on to.
    Yes, Micron. That is what I want to do. I wanted to write code to print the query database onto the report and to skip to a new page if a certain criteria is met.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    The most pressing problem is that Access has no way to send formatted and aligned data to the printer without involving a database report or query object AFAIK. You can output a form or query to the printer, with quite different results, but you can't program data printout in formatted layout. I think your only Access option is to replicate your pre-printed form as a report and print the report instead, or maybe replicate the report and substitute your form for the paper supply. In the latter case, all of your report controls would have to have no borders so that only text would print onto your pre-printed form. Access' handling of the report printout should be able to accomodate the routines and sub routines you envision by proper use of grouping. There is a chance you would need report formatting events to break up the output into the sections you mentioned.

  6. #6
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    I've already provided an answer in this thread
    https://www.accessforums.net/showthread.php?t=57834

    So was just continuing in the current thread

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Not often I'll see cross/double posting by the same person in the same forum, I hope.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-01-2016, 10:54 PM
  2. Slow processing on Split database - BE and FE
    By stigmatized in forum Programming
    Replies: 11
    Last Post: 04-30-2014, 01:35 PM
  3. Another Question on Printing Forms
    By MJeanBap in forum Forms
    Replies: 7
    Last Post: 01-05-2012, 07:52 AM
  4. Printing question
    By cbrsix in forum Reports
    Replies: 3
    Last Post: 12-22-2011, 03:18 PM
  5. New Database - Batch processing
    By stevo2820 in forum Database Design
    Replies: 0
    Last Post: 04-30-2007, 02:22 AM

Tags for this Thread

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