98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Data Reporting
Data Reporting
Resolved · Low Priority · Version 2003
Okechi has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Data Reporting
What codes does one need to be able to use the input box to extract data to be reported for a specified period?
RE: Data Reporting
Hi Okechi
Thank you for your question
You would first need to create two date variables, one for the start date and another for the end date.
You would then embed the two variables into an SQL statement that is used to define the ADO recordset object.
The key is to use a where clause in the sql and embed the two variables, literally quoting the # symbol as in the example below
Const SQL As String = "SELECT * FROM qryOrdersForExcel WHERE OrderDate >=" & "#" & dteStart & "#" & "AND OrderDate <=" & "#" & dteFinish & "#"
Hope this is useful
Regards
Stephen
Thu 12 Mar 2009: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Adjusting the Elevation and Rotation in a 3-D ChartFor any 3-D chart you create, you can adjust the chart |