![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 12:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com