Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Narrowing on query (date customised) using VBA in ExcelSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Vista and Office 2007 Forum

 New Topic 
 
 Post Reply 
[1]  
 Narrowing on query (date customised) using VBA in Excel 
 Author   Message 
  kanes 
  
 Group: Members 
 Posts: 15 
 Joined: 2008-04-15 
 Profile
 Posted : 2008-04-15 22:27:58
Hi,

I am trying to extract some data from Quickbooks using Excel internal option 'Data > From other sources  using Office 2007.

During the extraction wizard I am asked for Date range for TxnDate entry....this works fine when done manually but not when recorded into Macro for date input by User.

 format generated in the macro is:

-------------------
        "SELECT InvoiceLine.TxnDate, InvoiceLine.InvoiceLineItemRefFullName, InvoiceLine.InvoiceLineQuantity" & Chr(13) & "" & Chr(10) & "FROM InvoiceLine InvoiceLine" & Chr(13) & "" & Chr(10) & "WHERE (InvoiceLine.TxnDate>{d '2008-03-14'})" & Chr(13) & "" & Chr(10) & "ORDER BY InvoiceLine.Tx" _
        , "nDate")
--------------------

Can I customise the below line so that the date can be picked up as input from the user and be acceptable to Excel

                  InvoiceLine.TxnDate>{d '2008-03-14'}

or if there is any other alternative using a variable for date.

Thanks.
 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-04-16 10:00:49
Try looking at: How do I use prompted date ranges in MS Excel?  

  Top 
  kanes 
  
 Group: Members 
 Posts: 15 
 Joined: 2008-04-15 
 Profile
 Posted : 2008-04-16 21:39:18
Hi Tom,

I managed to go through the procedure and it is working fine.

The code I am using in VBA now is:

"WHERE (InvoiceLine.TimeCreated>=? And InvoiceLine.TimeCreated<=?)"

Is there anyway I can edit it so during macro execution it doesn't ask 'Enter Paramter'
but something like 'Enter Start Date' in the popup input box Title.

Thanks. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to