CONTENTS OF TEXTBOX TO BE THE CRITERIA ON A DATABASE QUERY

  • Thread starter Thread starter AQM
  • Start date Start date
A

AQM

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.
 
THANKS
THATS EXACTLY WHAT I WAS LOOKING FOR BUT WHAT HAPPENS IF I NEED TO
RETURN THE DATA TO A PIVOT TABLE.
 
It shouldn't make any difference what you do with the data. Try it, and if
you run into problems, post back with specifics.
 
HI

THE PROBLEM IS THAT I CANT MOVE THE QUERY DIRECTLY INTO A PIVOT TABLE.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top