data reporting

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Data Reporting

Data Reporting

resolvedResolved · 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 courses

 

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Adjusting the Elevation and Rotation in a 3-D Chart

For any 3-D chart you create, you can adjust the chart

View all Excel hints and tips


Server loaded in 0.09 secs.