Hi
I have an SQL data source (view) feeding my spreadsheet
The view selects activities completed that day by a particular user. As we have many users, I have written a number of different views for each user
i.e - Select * from History where user = ‘Wayne’
As you know, staff come and go, and I am getting a bit bored with doing this.
I was wondering would it be possible to have just a single field form where the User name can be entered.
So my query would be “Select * from History where user =” and whatever is entered in the box completes the statement.
I know this can be done manually using “edit query”, but the reports are supplied to others as management tools.
At present each individual report has a refresh button with below code attached
Range("C1").Select
Selection.ListObject.QueryTable.refresh BackgroundQuery:=False
I was hoping that if the refresh button was pressed, it would bring up a one field form that asks for the userid, once that is entered the user presses “OK” on the form and it disappears, and the above code is run, returning only the data for the specific user.
Is that asking a bit much? Do I make sense, is there a far easier way of doing this?
Using Excel 2007,
Cheers
Wayne
I have an SQL data source (view) feeding my spreadsheet
The view selects activities completed that day by a particular user. As we have many users, I have written a number of different views for each user
i.e - Select * from History where user = ‘Wayne’
As you know, staff come and go, and I am getting a bit bored with doing this.
I was wondering would it be possible to have just a single field form where the User name can be entered.
So my query would be “Select * from History where user =” and whatever is entered in the box completes the statement.
I know this can be done manually using “edit query”, but the reports are supplied to others as management tools.
At present each individual report has a refresh button with below code attached
Range("C1").Select
Selection.ListObject.QueryTable.refresh BackgroundQuery:=False
I was hoping that if the refresh button was pressed, it would bring up a one field form that asks for the userid, once that is entered the user presses “OK” on the form and it disappears, and the above code is run, returning only the data for the specific user.
Is that asking a bit much? Do I make sense, is there a far easier way of doing this?
Using Excel 2007,
Cheers
Wayne