Data Range

YukiLeong

New Member
Joined
Jul 16, 2014
Messages
11
I have a small problem. I have a report based on a query which requires the user
to input the date range. I would like this date range to be a label in the
report.

i already keying tha formula fo the data range.. Audit Fees
Report is my form


Between [Forms]![Purchase Report]![From] And [Forms]![Purchase Report]![To]

I am trying to run a report for the period
"December 1 2010 to March 31 2011" However, it came out a warning message
box.

" the expression is typed incorrectly or it is too complex....bla
..ba....try simplifying the expression by assigning parts pf the expression to
variables"

anything wrong for my formula?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I found that a problem too...( Hey Access, its not really complex)
BUT what I did is:
create a text box (mine is invisible to user) called txtRng. When the user clicks the open report button, a small code writes the 'text' version of the date range ....
txtRng = "From " & [Forms]![Purchase Report]![From] & " to " & [Forms]![Purchase Report]![To]
then opens the report, and the query has a virtual field : [Forms]![Purchase Report]![txtRng]

Access cant calculate that formula but it CAN just display the text box value.
 
Upvote 0
I found that a problem too...( Hey Access, its not really complex)
BUT what I did is:
create a text box (mine is invisible to user) called txtRng. When the user clicks the open report button, a small code writes the 'text' version of the date range ....
txtRng = "From " & [Forms]![Purchase Report]![From] & " to " & [Forms]![Purchase Report]![To]
then opens the report, and the query has a virtual field : [Forms]![Purchase Report]![txtRng]

Access cant calculate that formula but it CAN just display the text box value.

Hi..
I change the criteria ard, although the warning message will not pop up again...However, after i key the date range, my report dose not show any information, all report is blank..anything i doing wrong? below is my SQL view...

SELECT tblAuditFees.InvoiceID AS tblAuditFees_InvoiceID, tblAuditFees.InvoiceDate, tblAuditFees.CustomerID, tblCustomer.CustomerName, tblAuditFees.EmployeeID, tblEmployee.EmployeeName, tblAuditFees.BasicAuditFees, tblAuditFees.VolumeOfTrasaction, tblAuditFees.ControlRisk, tblAuditFees.InherentRisk, tblAuditFees.ProfitOfCompany, tblAuditFees.Workload, tblAuditFees.AdditionCharge, tblAuditFees.TotalAuditFees
FROM tblCustomer INNER JOIN (tblEmployee INNER JOIN tblAuditFees ON tblEmployee.EmployeeID = tblAuditFees.EmployeeID) ON tblCustomer.CustomerID = tblAuditFees.CustomerID
WHERE ((("txtDate")="From" & [Forms]![AuditFeesReport]![From] & "to" & [Forms]![AuditFeesReport]![To]));


Thanks...
 
Upvote 0
Hi..
I change the criteria ard, although the warning message will not pop up again...However, after i key the date range, my report dose not show any information, all report is blank..anything i doing wrong? below is my SQL view...

SELECT tblAuditFees.InvoiceID AS tblAuditFees_InvoiceID, tblAuditFees.InvoiceDate, tblAuditFees.CustomerID, tblCustomer.CustomerName, tblAuditFees.EmployeeID, tblEmployee.EmployeeName, tblAuditFees.BasicAuditFees, tblAuditFees.VolumeOfTrasaction, tblAuditFees.ControlRisk, tblAuditFees.InherentRisk, tblAuditFees.ProfitOfCompany, tblAuditFees.Workload, tblAuditFees.AdditionCharge, tblAuditFees.TotalAuditFees
FROM tblCustomer INNER JOIN (tblEmployee INNER JOIN tblAuditFees ON tblEmployee.EmployeeID = tblAuditFees.EmployeeID) ON tblCustomer.CustomerID = tblAuditFees.CustomerID
WHERE ((("txtDate")="From" & [Forms]![AuditFeesReport]![From] & "to" & [Forms]![AuditFeesReport]![To]));


Thanks...


hihi...i ard find the solution to solve it.. it use >
=[Forms]![AuditFeesReport]![From] And <=[Forms]![AuditFeesReport]![To] ...thanks...
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top