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 / Reports / Printing / March 2007

Tip: Looking for answers? Try searching our database.

Print report newbie question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Victoria - 01 Mar 2007 01:50 GMT
i am totally new at reports and I'd like help with this question.  
I use two unbound combo boxes on my form (cbxSession) and cbxDay) to select
matching records from the underlying query. (works great)  Now I have added a
Print button with the following code:

   Dim stDocName As String
   stDocName = "rptTest"
   DoCmd.OpenReport stDocName, acPreview

When I click the button, I get two parameter messages asking for the values
of the combo boxes.  What is the right syntax to print only the records that
are already selected and on the form?  Also, is it done by the button's code
or in the report's code?

thank you for your help
Al Campagna - 01 Mar 2007 03:08 GMT
Victoria,
  You need to reference the values contained in the controls on the open form.
  Place this in the ControlSource of cbxSession...
=Forms!frmYourFormName!cbxSession
  And for cbxDay...
=Forms!frmYourFormName!cbxDay

 I'm a bit confused as to how your filtering the report though.  I would expect that
those 2 values would be used to filter the records delivered to the report via the
underlying query...
Signature

hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

>i am totally new at reports and I'd like help with this question.
> I use two unbound combo boxes on my form (cbxSession) and cbxDay) to select
[quoted text clipped - 11 lines]
>
> thank you for your help
Victoria - 01 Mar 2007 08:46 GMT
Al - thanks for the response.  It was just a silly typo on my part.
 
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.