?
Solved

Print current record displayed in the form

Posted on 2015-01-26
5
Medium Priority
?
156 Views
Last Modified: 2015-01-26
I have a command button in the footer of a form.  The form is Display View = Single Page.

Even though the form has several records that can be navigated to, I want to print JUST the record being displayed.  

What would the onclick code of the command button be to accomplish this?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40571320
create a report with recordsource based on the recordsource of your form then use this codes

docmd.openreport "NameOfReport", acviewNormal,, "[IdfieldName]=" & me.txtIdfield


change [IdfieldName] with actula name of the field
change txtIdfield with actual name of the control
0
 

Author Comment

by:SteveL13
ID: 40571334
I actually just want to print the form with the current record data included.  I realize that a report would be better looking.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40571342
access report is not really for printing, you may not like the result.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40571344
oops, that should be

access FORM  is not really for printing, you may not like the result.
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 2000 total points
ID: 40571410
Try:

    If Me.Dirty Then
       Me.Dirty = False
    end If
    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.PrintOut acSelection
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question