Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Choosing what information to filter from SQL in VBA


Hello,

I have recorded a macro that connects to the SQL warehouse for a specific
ClientID.

Is it possible to alter the VBA so that I can choose what ClientID I want to
retrieve? I was thinking of using an input box
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Choosing what information to filter from SQL in VBA

On Nov 1, 9:07 am, scubadiver
wrote:
Hello,

I have recorded a macro that connects to the SQL warehouse for a specific
ClientID.

Is it possible to alter the VBA so that I can choose what ClientID I want to
retrieve? I was thinking of using an input box


Hi
A bit vague
Is the ClientID a text string, a number...
Is the ClientID on a worksheet, in a database, a parameter in another
sub, part of an SQL string...

At the moment, the answer to your question is "yes, probably"
regards
Paul

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Choosing what information to filter from SQL in VBA


ClientID is a text string in an SQL server table.

Here is the SELECT statement from the VBA


"SELECT Account.AccountID, Account.ClientID, Account.Forename,
Account.Surname, Account.Address1, Account.PostCode, Account.DateOfBirth,
Account.AccountStatus FROM Warehouse.dbo.Account WHERE
Account.ClientID='FTC001'"



" wrote:

On Nov 1, 9:07 am, scubadiver
wrote:
Hello,

I have recorded a macro that connects to the SQL warehouse for a specific
ClientID.

Is it possible to alter the VBA so that I can choose what ClientID I want to
retrieve? I was thinking of using an input box


Hi
A bit vague
Is the ClientID a text string, a number...
Is the ClientID on a worksheet, in a database, a parameter in another
sub, part of an SQL string...

At the moment, the answer to your question is "yes, probably"
regards
Paul


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Choosing what information to filter from SQL in VBA


Ive done it.



" wrote:

On Nov 1, 9:07 am, scubadiver
wrote:
Hello,

I have recorded a macro that connects to the SQL warehouse for a specific
ClientID.

Is it possible to alter the VBA so that I can choose what ClientID I want to
retrieve? I was thinking of using an input box


Hi
A bit vague
Is the ClientID a text string, a number...
Is the ClientID on a worksheet, in a database, a parameter in another
sub, part of an SQL string...

At the moment, the answer to your question is "yes, probably"
regards
Paul


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter out rows of information in a list via VBA James C[_2_] Excel Discussion (Misc queries) 8 January 26th 10 05:08 PM
information filter scott Excel Discussion (Misc queries) 3 August 25th 08 11:34 PM
Copy filter Information kmodrall Excel Discussion (Misc queries) 2 August 8th 07 04:22 PM
filter and keep same information. WellsDesign Excel Worksheet Functions 3 March 25th 05 01:36 AM
Using formulas to filter information Anthony[_10_] Excel Programming 1 September 16th 04 12:12 PM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"