Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    8

    Unanswered: printing a record in a form

    Hi there,
    I have a form with a subform in it. I am showing one record at a time in the main form and would like to print ONLY the shown record and not every record. Could someone please tell me how i can go about doing this? Thanks in advance.
    Chris

  2. #2
    Join Date
    Feb 2003
    Posts
    44

    Re: printing a record in a form

    Originally posted by cmthomps
    Hi there,
    I have a form with a subform in it. I am showing one record at a time in the main form and would like to print ONLY the shown record and not every record. Could someone please tell me how i can go about doing this? Thanks in advance.
    Chris
    Hi, I would create the report that you will print the same as you created the forms (i.e. report with a subreport)

    Then you can create a command button in the form and do something like this:

    stDocName = "yourReportNameHere"
    stLinkCriteria = "[maintablename].[NameOfTablesKey]=" & Me![NameOfTablesKey]

    DoCmd.OpenReport stDocName, acNormal, , stLinkCriteria

    that way the report is opened only to the data specified in your linkCriteria which is the current Key value (one record).

    Last edited by jameselmer; 02-21-03 at 14:28.
    James Elmer
    Clinical Programmer Analyst
    Wellstat Biologics Corporation
    800.227.0582 x3338
    jelmer@wellstatbiologics.com

  3. #3
    Join Date
    Feb 2003
    Location
    Minnesota
    Posts
    3

    Re: printing a record in a form

    Originally posted by cmthomps
    Hi there,
    I have a form with a subform in it. I am showing one record at a time in the main form and would like to print ONLY the shown record and not every record. Could someone please tell me how i can go about doing this? Thanks in advance.
    Chris
    The other thing you can do is select print under file and then click on the radio button for selected record. This will only print the record you have on your screen.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •