473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Running pre-defined queries and save the result in an excel file

Hello,

As part of an application that I am trying to create thru MS Access, the user enters few parameters and based on that I would like the result of some predefined queries to be saved in an excel file (in separate worksheets). I have created a table which lists the name of queries in one field and user's parameters in a separate fields. When I select a command button, I like the queries run one at the time (go thru each record find the query in the table) and the results are saved in an excel file. For example, in the table below if teh user enters 1 and A, then Query-A-1 and Query-A-2 should be run and their records be saved in one excel file. I can do this by creating multple IF - statements. However, I would like to know if it is possible to do this in a differnt way (i.e one loop)

User Data 1 User Data 2 Queries
1 A Query-A-1
1 A Query-A-2
2 B Query-B-1
2 B Query-B-2

Thank you in advance.
May 4 '10 #1
2 1685
Jim Doherty
897 Expert 512MB
@mborhanian
Yes you can loop through records in either a table or query according to preset logic and using 'Office' automation, save the results to an excel file.

Yes this can be done where it is on separate sheets again using automation techniques

What is your approach to this, what have you coded yourself to make this work?

If you show something done yourself I am sure others will be happy to contribute rather than just give a solution to this
May 10 '10 #2
NeoPa
32,556 Expert Mod 16PB
Application Automation would be a good starting point for your work.
May 11 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Brian Kelley | last post by:
I have been using gettext and various utilities to provide internationalization for a wxPython application and have not really been liking the process. Essentially it uses a macro-style notation...
7
by: Alan Illeman | last post by:
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: <BODY> <PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px...
2
by: Buck Turgidson | last post by:
I want to have a css with 2 PRE styles, one bold with large font, and another non-bold and smaller font. I am new to CSS (and not exactly an expert in HTML, for that matter). Is there a way to...
3
by: Michael Shell | last post by:
Greetings, Consider the XHTML document attached at the end of this post. When viewed under Firefox 1.0.5 on Linux, highlighting and pasting (into a text editor) the <pre> tag listing will...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
3
by: Dave Harris | last post by:
Is there an effective way to get a running log of JITTED functions as a program executes? We have a process monitor that is telling us that 2000+ functions are jitting just to get to our to the...
4
by: Wayne Calvert | last post by:
Hello All I hope you can help with running web applications in VB.NET. I have just started working with ‘Visual Basic .NET Black Book’. I am at page 12 have created the web application...
10
by: Daves | last post by:
Is there any way to have a custom server control for all aspx pages which runs code before the page_load event? I need some code to be run before the page_load since it's supposed to change some...
60
by: harshal | last post by:
Hi all, Can we read the stack frame's of the current process. as we know that whenever a function call is made in c new functions stack frame is created and pushed on to the stack. and when the...
4
by: Olumide | last post by:
Hi - I'm writing a plugin with VS.NET (2003), for an application (Autodesk Maya). My work cycle is basically: 1. write code 2. unload plugin in target application (where I do my testing) 3....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.