ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY (https://www.excelbanter.com/excel-programming/299536-contents-textbox-criteria-database-query.html)

AQM

CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY
 
Some One Please help

I have created a macro to return data from a database, the problem i
face is that within this macro i have a query which is based on
selection criteria on what data should be returned.
I use this macro every single day but its not user freindly enough
what i need to do is to insert the selection criteria into the text
box and that information should be the information that goes into the
selection criteria of the query.

Dick Kusleika[_3_]

CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY
 
AQM

I don't fully understand the question, but try here

http://www.dicks-clicks.com/excel/Ex...htm#Parameters

and if that's not what you want try here

http://www.dicks-clicks.com/excel/Ex....htm#ChangeSQL

and if that's not what you want, then what is

query which is based on
selection criteria on what data should be returned.


and

insert the selection criteria into the text
box


--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com



AQ Mahomed

CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY
 
THANKS
THATS EXACTLY WHAT I WAS LOOKING FOR BUT WHAT HAPPENS IF I NEED TO
RETURN THE DATA TO A PIVOT TABLE.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Dick Kusleika[_3_]

CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY
 
It shouldn't make any difference what you do with the data. Try it, and if
you run into problems, post back with specifics.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"AQ Mahomed" wrote in message
...
THANKS
THATS EXACTLY WHAT I WAS LOOKING FOR BUT WHAT HAPPENS IF I NEED TO
RETURN THE DATA TO A PIVOT TABLE.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




AQ Mahomed

CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY
 

HI

THE PROBLEM IS THAT I CANT MOVE THE QUERY DIRECTLY INTO A PIVOT TABLE.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Dick Kusleika[_3_]

CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY
 
AQM

I think your caps lock button is stuck.

You can create a pivot table on the range where your query results are.
Also, you can save the query, then base the pivot table on that. Select a
cell in the query's result range and click the Edit Query button on the
External Data Toolbar. Go through the wizard until the last page (you don't
need to change anything, just click Next) and there should be a Save button.
Save the query from there.

Then create a pivot table and base it on External Data. Click the Get Data
button and navigate to the second tab of that dialog, called Queries. Your
saved query should be on there and you can base your Pivot Table on it.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"AQ Mahomed" wrote in message
...

HI

THE PROBLEM IS THAT I CANT MOVE THE QUERY DIRECTLY INTO A PIVOT TABLE.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




AQ Mahomed

CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY
 




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 09:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com