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 2 / June 2007

Tip: Looking for answers? Try searching our database.

Report Printing ( Dates Specified)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GregB - 28 Jun 2007 18:36 GMT
I have created a buytton to print a report based on user input.

I know how to create the button and macro to open the report
I have created a report based on a query that slects the records between the
dates the user inputed in the prompt.

Now what I want to do is add on the top of the report the dates the user
inputed

Such as saying Records for 01/01/01 to 01/01/02

How would I go about this?
Thanks,
Greg
Ofer Cohen - 28 Jun 2007 19:16 GMT
If the form is still loaded then you can use in the text box controlsource
within the report

="Dates are between " & Forms![FormName]![StartDateTextBox] & " And " &
Forms![FormName]![EndDateTextBox]

Signature

Good Luck
BS"D

> I have created a buytton to print a report based on user input.
>
[quoted text clipped - 10 lines]
> Thanks,
> Greg
GregB - 28 Jun 2007 19:26 GMT
That does not work.

I have the user inpuit in the query using the BETWEEN command

If there isn't a way to recall what they put in as paramaters
is there some code that will select the first record and last record and use
the dates that thoes indicate, since I have the report in accending order
based on the date.

> If the form is still loaded then you can use in the text box controlsource
> within the report
[quoted text clipped - 16 lines]
> > Thanks,
> > Greg
Ofer Cohen - 28 Jun 2007 19:38 GMT
If the query recordsource has

Select  from TableName Where DateFieldNAme Between [Please select start
date] And [Please select end date]

Then in the text box write

="Dates are between " &  [Please select start date] & " And " &
[Please select end date]

If that not the case, so can you explain what do you ean by the user input
parameters

Signature

Good Luck
BS"D

> That does not work.
>
[quoted text clipped - 25 lines]
> > > Thanks,
> > > Greg
zionsaal@gmail.com - 28 Jun 2007 19:16 GMT
> I have created a buytton to print a report based on user input.
>
[quoted text clipped - 10 lines]
> Thanks,
> Greg

openArgs wold be the best way
DoCmd.OpenReport "report name", acViewPreview, , , , your date criteria
Chris Reveille - 28 Jun 2007 19:40 GMT
I would recommentd creating a form with the from and to dates to be entered
and a command button to print the report

to refer to fields on a form
in the control source of the from and to fileds on the report put
[Forms]![NameOfForm]![NameOfTextbox]

You can also use these date in the query
Signature

Chris

> I have created a buytton to print a report based on user input.
>
[quoted text clipped - 10 lines]
> Thanks,
> Greg
 
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.