[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Print current record displayed in the form

Posted on 2015-01-26
5
Medium Priority
?
157 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

649 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