473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Query Date Parameter Write in Report

36
Hello People,

Is possible to write in reporte a query parameter? example

Between [Start date] and [End Date]

I need to put in report the Start date and End Date if the user put this date range in the popup parameter.

Is possible?
Mar 4 '08 #1
3 1570
NeoPa
32,556 Expert Mod 16PB
You would add a filter to the report when you open it :
Expand|Select|Wrap|Line Numbers
  1. ...
  2.   strWhere = "[DateField] Between #%F# And #%T#"
  3.   strWhere = Replace(strWhere, "%F", Format(Me.FromDate, "m/d/yyyy"))
  4.   strWhere = Replace(strWhere, "%T", Format(Me.ToDate, "m/d/yyyy"))
  5.   Call DoCmd.OpenReport("ReportName", acViewNormal, ,strWhere)
Mar 10 '08 #2
ElTipo
36
Thanks Again Neo,

Is possible to write an SQL Code in the text box? If I create a textbox like

=Min[Start Date] to Max[End Date]

and this show the minimum and maximun for type user range.

Sorry for my english.

I try the code to view the result
Mar 11 '08 #3
NeoPa
32,556 Expert Mod 16PB
I'm afraid I don't understand what you're asking, but my code basically does what I think you're after.

Me.FromDate & Me.ToDate refer to controls on your form (which can be TextBoxes).
Mar 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Michael DeLawter | last post by:
Using Access 2002. I have a chart in a report that is currently based on a query in which the user enters the start and end date for the chart to display. Both the start and end dates have been...
8
by: Yisroel Markov | last post by:
I have the following in my code: strSQL = "SELECT tblTransactions.PshpID, tblTransactions.TransDate, " _ & " Sum(tblTransactions.DDAmount) AS SumDDAmount FROM tblTransactions " _ & "INNER JOIN...
4
by: Andy Davis | last post by:
I have developed a number of reports that are based on parameter queries where the user enters criteria such as a date range and a sales rep say. I want to be able to show a graphical picture in...
2
by: Matt W via AccessMonster.com | last post by:
I based my parameter query off the following posting, but can't seem to work out a little kink. I cannot bring up a report without first typing in the month and year three times. The first time for...
2
by: Mike Abbott | last post by:
Hello folks, I am fairly new to access after using dBase III for the last 10 years. I have successfully imported dBase tales into access. I have created a Parameter Query with a start date...
1
by: jnikle | last post by:
I have a parameter query named "qry_employee_info_reports" that I need to run in the OnOpen event of a form. I'm after its total number of records. The query's got several joins in it, and one of...
5
by: sara | last post by:
I have reports that run from a form where the user can choose a date range, or they run automatically for a week in the "Weekly Reports" option. I created 2 queries and 2 reports - one query...
2
by: Bill | last post by:
I have a 200 record database that includes a date/time field, AnnivDate, for a wedding anniversary. AnnivDate has nulls and some incorrect year data. I have been creating the Access database...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.