Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
AQM AQM is offline
external usenet poster
 
Posts: 1
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default 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!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default 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!



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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!
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
Import New Database Query (Union Query) in Spreadsheet klock Excel Discussion (Misc queries) 2 September 24th 09 01:30 AM
Excel cell contents to query criteria Jimbo Excel Discussion (Misc queries) 1 April 22nd 09 07:46 PM
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 0 November 28th 05 06:37 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 08:46 AM.

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

About Us

"It's about Microsoft Excel"