Routine to run/export queries

Looking for some links to examples that do the following (or something 
close):

1. user would create a whole bunch of queries themselves (using Access)
2. form that lets the user runs these queries to display results and/or 
export
3. Would be good if user could select multiple queries and get multiple 
resultsets to display or be exported to
an excel file with multiple worksheets.  Example: user selects 5 queries and 
wants an excel file made with 5 tabs with the 5 different outputs of the 
queries, or the outputs of the 5 queries show in a form with multiple tabs 
in Access (hide/show tabs, set recordsources at runtime etc...).

Perhaps ability to use a table to track:
- queryname
- short description
- long description
- sort order

so this table could be setup to be used in the multi-select list box in #2 
above.

I don't need someone to explain how I would build this, just looking for 
code in case someone already built this exact thing or something close.

Thanks in advance,
Mark
 

0
Mark
5/26/2010 1:58:14 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
1070 Views

Similar Articles

[PageSpeed] 29

Mark Andrews wrote:
>Looking for some links to examples that do the following (or something 
>close):
>
>1. user would create a whole bunch of queries themselves (using Access)
>2. form that lets the user runs these queries to display results and/or 
>export
>3. Would be good if user could select multiple queries and get multiple 
>resultsets to display or be exported to
>an excel file with multiple worksheets.  Example: user selects 5 queries and 
>wants an excel file made with 5 tabs with the 5 different outputs of the 
>queries, or the outputs of the 5 queries show in a form with multiple tabs 
>in Access (hide/show tabs, set recordsources at runtime etc...).
>
>Perhaps ability to use a table to track:
>- queryname
>- short description
>- long description
>- sort order
>
>so this table could be setup to be used in the multi-select list box in #2 
>above.
>
>I don't need someone to explain how I would build this, just looking for 
>code in case someone already built this exact thing or something close.
>
>Thanks in advance,
>Mark

Mark,
I did something like this with the paired listbox thing in ADH 2002 Desktop
Chapter 12.
I sent my data to Word, but not terribly different.  Interface.. .right...
it's in there too.  The MultiPik class.  (Chapter 7).
I have a hopefully still working example I can send you if you want.  It
"merges" a bunch of query results to a Word table... it's not the same, but
it does use methods of the ADO recordset that you an use in Excel.

Only hard part I found was that ADO does not seem to like Crosstab queries.
Or maybe I just didn't know where to find them in the ADO hierarchy.
(Entirely possible!)  But since my crosstabs were fairly standard, I had an
empty table that I appended my crosstabs to and then used that to send the
data to Word.

HTH
Pieter

-- 
Message posted via http://www.accessmonster.com

0
PieterLinden
5/26/2010 3:34:44 PM
I would like to take a look at your example.

You can find my email on the contact page of the website.

-- 
Mark Andrews
RPT Software
http://www.rptsoftware.com

"PieterLinden via AccessMonster.com" <u49887@uwe> wrote in message 
news:a896329722083@uwe...
> Mark Andrews wrote:
>>Looking for some links to examples that do the following (or something
>>close):
>>
>>1. user would create a whole bunch of queries themselves (using Access)
>>2. form that lets the user runs these queries to display results and/or
>>export
>>3. Would be good if user could select multiple queries and get multiple
>>resultsets to display or be exported to
>>an excel file with multiple worksheets.  Example: user selects 5 queries 
>>and
>>wants an excel file made with 5 tabs with the 5 different outputs of the
>>queries, or the outputs of the 5 queries show in a form with multiple tabs
>>in Access (hide/show tabs, set recordsources at runtime etc...).
>>
>>Perhaps ability to use a table to track:
>>- queryname
>>- short description
>>- long description
>>- sort order
>>
>>so this table could be setup to be used in the multi-select list box in #2
>>above.
>>
>>I don't need someone to explain how I would build this, just looking for
>>code in case someone already built this exact thing or something close.
>>
>>Thanks in advance,
>>Mark
>
> Mark,
> I did something like this with the paired listbox thing in ADH 2002 
> Desktop
> Chapter 12.
> I sent my data to Word, but not terribly different.  Interface.. .right...
> it's in there too.  The MultiPik class.  (Chapter 7).
> I have a hopefully still working example I can send you if you want.  It
> "merges" a bunch of query results to a Word table... it's not the same, 
> but
> it does use methods of the ADO recordset that you an use in Excel.
>
> Only hard part I found was that ADO does not seem to like Crosstab 
> queries.
> Or maybe I just didn't know where to find them in the ADO hierarchy.
> (Entirely possible!)  But since my crosstabs were fairly standard, I had 
> an
> empty table that I appended my crosstabs to and then used that to send the
> data to Word.
>
> HTH
> Pieter
>
> -- 
> Message posted via http://www.accessmonster.com
> 
0
Mark
5/26/2010 3:45:02 PM
Reply:

Similar Artilces:

Import Export (produces internal trandlation system error)
When activating Import / Export the next box to show up is an error box saying "ternal tranlastion system error" Any thoughts appriciated, Glen. glen@computercare.co.nz ...

Export/Import Acces Table to another Acces table/file
Hi, Is anybody can help me how to export/import table to a new table/file only using 1 click?. I am sure, we'll use Visual Basic, but I don't know how. Thanks in advance, I am appreciated it. KT -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200707/1 I suspect you will need to look at the TransferDatabase method of the DoCmd object. See the Access help. Steve "KimTong via AccessMonster.com" wrote: > Hi, > > Is anybody can help me how to export/import table to a new table/file only > using 1 ...

Query and Extract
Hello all, This seems basic, but I just cannot get it. While using SQL Server 2005 and the Microsoft SQL Server Management Studio, I created a database called AssetQuote. Inside I have on table called assetquotes. From there, I have three columns, (date, quote, author) The column type for date is datetime and the other two are just text. My Query is something this: INSERT INTO AssetQuote (date, quote, author) VALUES('052010','No act of kindness, no matter how small, is ever wasted.', 'Aesop'); When I run the query I get this result: Msg 208, ...

Run Blocked Attachment
Whenever I try to run a shortcut link which I inserted in the note area of a Task item or an Appointment item , I receive an Attachment Security Warning. Is there any way to run it directly without saving it? I've already unblocked the filetype through Level1Remove in the registry. Still, directly running a shortcut link in the attachment won't be allowed. Please help. Thanks. Armstrong ...

Running Query from form with wildcards
Based on a previous post, I used [Forms]![Search Form]![MLO #] in my query to refer to my form and put a command button to run the query. The MLO # is a catalog number in the form of ####-####. I am able to run the query for exact matches to the entire field but it doesn't work for ranges or matches to part of the field. Is there a way to use wild cards on the form? I've tried typing an expression on the form as I would on the query, such as >####-####. I also have a column for desciption refered to as [Forms]![Search Form]![Description] in my search. For this column we...

Select, update query--same query, different result
Hi I have an existing Update query that I just copied and converted to a Select query. When I run it as an Update query, I get 4 records. However, when I run it as a Select query, I get 411 records. It is the same query with the exception of Select vs. Update. Anyone know why this is? Paul Why did you not post the SQL so it could be looked at? -- Build a little, test a little. "Paul" wrote: > Hi > I have an existing Update query that I just copied and converted to a Select > query. When I run it as an Update query, I get 4 records. However, whe...

Which Endian routine is better?
I am converting big endian to little endian and have written these two functions: Function Endian32_UsingString(ByVal n As Long) As Long Dim s As String Dim d As String Dim i As Integer s = Right$("0000000" & Hex$(n), 8) For i = 1 To 7 Step 2 d = Mid$(s, i, 2) & d Next Endian32_UsingString = CLng("&H" & d) End Function Function Endian32_UsingByteArray(ByVal n As Long) As Long Dim big(3) As Byte Dim little(3) As Byte CopyMemory big(0), n,...

Refresh and run Excel macro
I have a table of data that changes daily and I need to update and save a linked Excel spreadsheet with the new data. The spreadsheet is complex with multiple tabs and formatting and therefore I cannot just export the table and save. What I need to do from Access is open the Excel file, Refresh All and then run one additional Excel Macro. Here is what I have so far but it fails at the macro: Dim objExcel As Object Set objExcel = CreateObject("Excel.Application") objExcel.Application.Workbooks.Open "\\File Name.xls" objExcel.Application.Visible = True ...

Exporting to Excel
I hope someone can help with this... I have data in Access and it displays well in all reports. The data I am dealing with has part numbers. These part numbers often are in a format similar to: 073D11 073E05 ...... When I export a product list to excel, it is changing many (a LOT!) of the part numbers to scientific format. Example: 073D10 becomes 730000000000 (which appears as 7.3E +11) 073E11 becomes 7300000000000 (which appears as 7.3E + 12) How can I export o Excel and retain the proper number formats (effectively as text)? I have searched through the Microsoft site and found i...

Text running
Hello I don't know if there is a code that keeps a word ( for example FOOTBALL) running from left to the right of the cell. I appriciate even a small help. Thanks in advance Where would you like it to run to? English and most other languages run left to right. Middle East countries usually run right to left. There are various methods of text alignment in cell formatting>alignment. Gord Dibben MS Excel MVP On Thu, 15 Apr 2010 09:39:01 -0700, MAX <MAX@discussions.microsoft.com> wrote: >Hello >I don't know if there is a code that keeps a wor...

Check Links Purchasing routine & Reconcile Inventory routine *slow
The process is getting stuck/slow at the following (below). I didn't find any info in CustomerSource. Check Links: Purchasing: very slow, took ~4 hours to get to 7% <had to cancel process> Reconcile: Inventory: stuck on 0% for 2 hours <had to cancel process> Any suggestions? Have you tried running check links directly on the server? How are you connecting to the server? Are users in the system when you are running these? -- Victoria Yudin GP MVP "GPI" <GPI@discussions.microsoft.com> wrote in message news:398E7C16-0D04-43B0-A933-E1E990AAC4E5@microsof...

union query 02-08-10
I am trying to develop a union query for my 2 inventory balances. the query comes back with the first 2 fields correctly but when it comes to the balances it isn't taking into accoutn the balance from my 2nd query. SELECT [INVENTORY R&D 7th].[PART #], [INVENTORY R&D 7th].[PART NAME], [INVENTORY R&D 7th].[END BALANCE] FROM [INVENTORY R&D 7th] WHERE ((([INVENTORY R&D 7th].[END BALANCE]>0))) UNION SELECT [INVENTORY R&D].[PART #], [INVENTORY R&D].[PART NAME], [INVENTORY R&D].[END BALANCE] FROM [INVENTORY R&D] WHERE ((([INVENTORY R&D...

CRM3 Bug Entity Export does not function correctly
In CRM 3 the entity export will not export the user entity with it's site attribute set to Business Required. This seems to be a problem when you try to export a lookup type field in CRM. The site field is a lookup field. We have been able export system entites that are not of type lookup. ...

Running simple business using office
Hi, I'm a student and have begun selling some books on amazon. I wanted to develop my business process skills so see it as running a small business. I want to use office to store my 'inventory,' transactions, generate simple invoices and perform some simple analysis e.g. how much i made in a month. (I have student edition with excel and word) I want to keep one data source from which I can perform these tasks. I've got a lot of programming experience but its more from a business process perspective i'm interested. e.g. the best way to store and manipulate the data. I would ...

Run Time error 91
-------------------------------------------------------------------------------- Hi, I have a little matrix 5R x 6C. Located on a sheet in Cells E23:J27 All cells within the matrix have data validation in them to restric the input to "1" or "0". It is OK to have mutiple selections of "1's in the same row, except if the user happen to select a "1" for th sixth or last cell in the row. If that happens I would like the othe five cells in that row to have a value of "0". A couple of weeks ag Gary's Student gave me some starter Code that I have...

Lookup query?
I have a spreadsheet containing a list if projects. The projects are detailed by row and there are 20 columns for each project, each column detailing a different piece of information on that project. One of those columns advises the project manager's name ("Bob", "Pete", "Dave") or whether it is cancelled ("cancelled"). On a separate worksheet within the same file I want to detail all the cancelled projects (one in each row) and show column 6 (name of project), 10 (project number), 13 (budget) and 18 (what happened) of each cancelled project. Is...

running of external application
hi all, can somebody point me in the right direction of starting an en external application ie microsoft outlook with an excel 2003 spreadsheet please cheers steve To start Outlook, all you need is Dim oOL As Object Set oOL = CreateObject("Outlook.Application") oOL.Visible = True What do you want to do with it? -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Debby Bunce" <debbybunce@ntlworld.com> wrote in message news:CV2_f.302$_S1.102@newsfe5-gui.ntli.net... > hi all, > > > can somebody point me in th...

Multiple Criteria on One Field, query/report from form
Hello all, I have a tough problem I need to address. I need to generate a training report for a given employee. I have a list of possible positions. Each position has a series of mandatory training classes necessary to be certified in that position. Employees have taken classes for position certification and classes that do not contribute to certification. I need to separate mandatory training and Other training on my report, which is based off a query. I have a form with a combo box to pick an employee's name and a combo box to pick a position. Once the user picks these two things and...

Running headings in Publisher
I am producing a journal with about 15 articles, between 2 and 5 pages long. I need running heading to change with each. Do I have to duplicate master pages for each or is there an easier way. ...

exporting to SPSS
There have been a lot of questions about this, but I need to get excel data into SPSS --IN A PARTICULAR FORMAT-- because I will be appending it to an existing master dbase that has variables defined already. I can make SPSS read my excel data, I just can't make it read as string vs. numerical. Does excel have a function where I can define value labels ie., male=1, female=2 so that if the string in excel is 'male' then SPSS will read it as '1'??? No. Unless SPSS supports reading in either values or lables, You would have to convert your labels to the values SPSS stores....

integration manager
I'm trying to access a section of a source XML file (exported from Perfect Commerce) from a field script in an Integration Manager mapping. The ContactValue field is repeated several times and I can only access the first instance using the path SourceFields("ContactList.ContactInfo.ContactValue") Is it possible to use the SourceFields object to get to the email and fax instances of the ContactInfo field? Is there some other way? <ContactList> <ContactInfo> <ContactValue>555-555-5555</ContactValue> <ContactType>phone</C...

decimal places when exporting to Excel from SmartList
Hello: A GP 9.0 client is using 5 currency decimals in Inventory. And, 5 decimals are showing in the SmartList reports. But, when exporting the data to Excel, only 2 decimal places are showing. This is remedied by simply highlighting the columns in Excel and formatting the columns with 5 decimal places. Is there anyway, though, to configure Excel to allow for bringing over all 5 decimal places from SmartList automatically? The client is in an Excel 2003 environment. I don’t know if using Excel 2007 would remedy this, but……. childofthe1980s Disregard....I found that you have to m...

Defining a Range of Data with a Query
I have a range of data - say A1: D500. The range is being used like database with 6 column fields. I want to be able to identify the tw rows within the range. My data is hourly. The data displays multipl machine stats over various hours over various dates. I want t identify the first and last row where the fields match my query. Say Column A = Date, Column B = Hour, Column C = Machine and Column D Measured Data . Lets say I am querying on Date = 01/01/2004, Hour = 1. I need t search the array to find the start row and end row that have thes values in them. What I am really trying to...

running Excel 2007 macro in Win7
I have a co-worker who uses macros that I write for him who has recently upgraded to Win7 and now he is not able to enable the macro to run, I think due to security settings. This user will open the Excel file (using Excel 2007) which is located on a sharepoint (also 2007) and will click on the command button but gets a message that the macro cannot be run. When the Excel file is opened it looks like a web page, that is, the full ribbon is not visible and there is no Office icon in the upper left that he can click and go to Excel options to try and change the security settings. An...

export contacts #2
Can I export my contacts from MSN to contacts in Microsoft Office Outlook 2003? Is this correct terminology , if so how do I do this? Thank-you Carl R No you cannot. "Carl R" wrote: > Can I export my contacts from MSN to contacts in Microsoft Office Outlook > 2003? Is this correct terminology , if so how do I do this? > Thank-you > Carl R ...