Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / November 2007

Tip: Looking for answers? Try searching our database.

Printing just the current record of a subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 26 Nov 2007 22:55 GMT
Hello!

What's the best way to make a button print *just* the selected
(displayed) record of a subform, when that subform is currently part
of a larger form?

Thanks!
Stuart McCall - 26 Nov 2007 23:23 GMT
> Hello!
>
[quoted text clipped - 3 lines]
>
> Thanks!

Not sure if there is a best way to print a form. You ought to be printing a
report.

However, here's one way. Filter the subform so it has just the record you
want in its recordset, print the form, then switch off the filter:

With Me.SubformControlName.Form
   .Filter = "FieldName = <whatever>"
   .FilterOn = True
End With

'Do the print out

Me.SubformControlName.Form.FilterOn = False
Ron2006 - 27 Nov 2007 20:13 GMT
Here is a way to do it manually. Maybe someone can enlighten us on how
to do it programatically.

When you are sitting on any form in form view (execution). go to the
menubar and select
file
  print preview.

This brings up a print preview of what is on the screen with a
(questionable) option of printing it as is or just printing the data
part (without column headings or labels)

Ron
Ron2006 - 29 Nov 2007 22:08 GMT
I found where I had done it on a button:

   DoCmd.RunCommand acCmdPrintPreview

Ron
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.