Print Selected Record

Discussion in 'Microsoft Access' started by Guest, Jul 13, 2006.

  1. Guest

    Guest Guest

    I have a form that is larger than 8.5" and the area of the form that contains
    the information that I want to print is less than this -- how can I print the
    selected record (using File --> Print) only on one 8.5 x 11 page without all
    the other "junk" (buttons on the right of my form which don't need to print
    but will print on page 2).

    Make sense?
     
    Guest, Jul 13, 2006
    #1
    1. Advertisements

  2. The best approach in these cases is to simply layout and build a report.

    Reports are actually for being printed, and thus you can have things like
    page number, or all kinds of things that make no sense at all on a form.

    So,

    forms = good idea for data entry
    reports = good idea for printing

    The trick is thus to build/layout the report the way you want. Then, place a
    button on your form, and have that button RESTRICT the report the ONE
    CURRENT record. The following code will do this

    me.refresh ' write current record to disk (so report can use data)

    docmd.openReport "YourNiceReprot",acviewPreview,,"id = " & me!id

    The above assumes your current record does have a primary key of id (most
    table do have this....but, if you used something different, then change id
    to whatever you used for the primary key of the record).


    --
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada

    http://www.members.shaw.ca/AlbertKallal
     
    Albert D.Kallal, Jul 13, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Woody

    Cannot select "selected record"

    Woody, Jul 2, 2003, in forum: Microsoft Access
    Replies:
    1
    Views:
    495
    Allen Browne
    Jul 3, 2003
  2. David
    Replies:
    2
    Views:
    633
    Derek Brown
    Oct 1, 2004
  3. Howard

    find/replace only searches selected record

    Howard, Jan 29, 2004, in forum: Microsoft Access
    Replies:
    0
    Views:
    250
    Howard
    Jan 29, 2004
  4. Guest
    Replies:
    4
    Views:
    360
    Sandra Daigle
    May 6, 2004
  5. SWu
    Replies:
    4
    Views:
    359
  6. Guest
    Replies:
    2
    Views:
    338
    Guest
    May 26, 2006
  7. HX

    print selected from print preview?

    HX, Jul 11, 2007, in forum: Microsoft Access
    Replies:
    4
    Views:
    320
    Arvin Meyer [MVP]
    Jul 12, 2007
  8. spreadsheetlady
    Replies:
    1
    Views:
    1,276
    Jeff Boyce
    Jan 26, 2010
Loading...