473,699 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Queries - 1 date range

Hi All,

This may be a really obvious thing that I'm missing ... but if anyone can
help, I'd appreciate it.

I have MS Access 2000:

I'm using it for a CRM type database. I have a table with names, date they
first became a customer, and about 3 fields of addional info.
I.e.
What was the source of the business (source)
What was the advertising they saw to find us (Advert)
Type of customer (type) "Home" or "Commercial "
I have a number of queries I want to run via a date range
E.g. Q1, Q2, Q3. All to be run with paramaters of 31/5/2004 to 1/7/2004
(to encomapss all of June 2004 data).

Is there a way I can have a marco run to run the queries in turn, (I can
append their outpot to a table), - that I only have to input the date
ranges the once? As opposed to for EACH query?

Thanks in advance for anyone who knows how to do this.

P.s. What I know about VBA programming can be stored in a matchbox, without
removing any of the matches.

Thanks again.

Adam
Nov 13 '05 #1
2 2811
Adam <re*@apd1.net > wrote in message news:<Xn******* *************** **@203.59.27.13 1>...
Hi All,

This may be a really obvious thing that I'm missing ... but if anyone can
help, I'd appreciate it.

I have MS Access 2000:

I'm using it for a CRM type database. I have a table with names, date they
first became a customer, and about 3 fields of addional info.
I.e.
What was the source of the business (source)
What was the advertising they saw to find us (Advert)
Type of customer (type) "Home" or "Commercial "
I have a number of queries I want to run via a date range
E.g. Q1, Q2, Q3. All to be run with paramaters of 31/5/2004 to 1/7/2004
(to encomapss all of June 2004 data).

Is there a way I can have a marco run to run the queries in turn, (I can
append their outpot to a table), - that I only have to input the date
ranges the once? As opposed to for EACH query?

Thanks in advance for anyone who knows how to do this.

P.s. What I know about VBA programming can be stored in a matchbox, without
removing any of the matches.

Thanks again.

Adam


The easiest way to do this is to use an unbound form to collect the
dates. Create a new form with no recordsource (so you won't pick a
table/query when the wizard prompts - you'll just go on to the next
step). Then drop two textboxes onto your form, set their format as
date. Then name them something useful. txtStartDate and txtEndDate.

Then in your query, just point the parameters to your open form.
....WHERE SomeDate BETWEEN [Forms]![MyForm]![txtStartDate] AND
[Forms]![MyForm]![txtEndDate]
Nov 13 '05 #2
Pieter,

Thanks for the answer - Exactly what I needed to know.

Cheers,

Adam

pi********@hotm ail.com (Pieter Linden) wrote in
news:bf******** *************** ***@posting.goo gle.com:
Adam <re*@apd1.net > wrote in message
news:<Xn******* *************** **@203.59.27.13 1>...
Hi All,

This may be a really obvious thing that I'm missing ... but if anyone
can help, I'd appreciate it.

I have MS Access 2000:

I'm using it for a CRM type database. I have a table with names,
date they first became a customer, and about 3 fields of addional
info. I.e.
What was the source of the business (source)
What was the advertising they saw to find us (Advert)
Type of customer (type) "Home" or "Commercial "
I have a number of queries I want to run via a date range
E.g. Q1, Q2, Q3. All to be run with paramaters of 31/5/2004 to
1/7/2004 (to encomapss all of June 2004 data).

Is there a way I can have a marco run to run the queries in turn, (I
can append their outpot to a table), - that I only have to input the
date ranges the once? As opposed to for EACH query?

Thanks in advance for anyone who knows how to do this.

P.s. What I know about VBA programming can be stored in a matchbox,
without removing any of the matches.

Thanks again.

Adam


The easiest way to do this is to use an unbound form to collect the
dates. Create a new form with no recordsource (so you won't pick a
table/query when the wizard prompts - you'll just go on to the next
step). Then drop two textboxes onto your form, set their format as
date. Then name them something useful. txtStartDate and txtEndDate.

Then in your query, just point the parameters to your open form.
...WHERE SomeDate BETWEEN [Forms]![MyForm]![txtStartDate] AND
[Forms]![MyForm]![txtEndDate]


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6087
by: BlackFireNova | last post by:
Using Access 2002 I am writing a report which draws data from several different tables. I can't link all the tables in a query, as some can not be related without truncating the data. I plan to use sub-queries and sub-reports to filter and display the data in the unrelated tables in my report. The common information is a user-inputed date range. I want to avoid having the user prompted for the and variables repeatedly. Somehow I...
12
6379
by: Steve Elliott | last post by:
I have a query set up to gather together data between two specified dates. Shown in the query column as: Between #24/09/2004# And #01/10/2004# Is it possible to enter several different date ranges, ie between 24/09/2004 and 01/10/2004 together with 05/10/2004 and 07/10/2004 ? If I enter the "Between" criteria on different lines it returns no data.
6
4991
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing for long running reports. When the processing is complete it uses crystal reports to load a template file, populate it, and then export it to a PDF. It works fine so far....
7
3386
by: serge | last post by:
How can I run a single SP by asking multiple sales question either by using the logical operator AND for all the questions; or using the logical operator OR for all the questions. So it's always either AND or OR but never mixed together. We can use Northwind database for my question, it is very similar to the structure of the problem on the database I am working on. IF(SELECT OBJECT_ID('REPORT')) IS NOT NULL DROP TABLE REPORT_SELECTION
2
13554
by: chrisale | last post by:
Hi All, I've been racking my brain trying to figure out some sort of Sub-Select mySQL statement that will create a result with multiple rows of averaged values over a years time. What I have is weather data. There is a new record every 5 minutes, every day. So. What I want to do with one SQL statement is figure out the Average of those 5 minute records over each day, for every day of the year.
1
2281
Altius
by: Altius | last post by:
Access Version: 2003 OS: XP Pro Sorry if this is a bit long winded. First a little info about the database. This database is used to keep track of checkout information from our production department. It has three main tables that store information, the first one, that I have named "Checkout", stores the information I am querying for the two reports. It has six different fields - OrderNumber, Date, CheckedBy, BuiltBy, SerialNumber, and...
11
3670
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night) and the 'employee name'. There is another table which assigns an ID to the Shifts, i.e. 1,2 and 3 for morn, eve & night shifts respectively. From the mother table, the incentive is calculated datewise for each employee as per his shift duty. In...
4
1335
matrekz42
by: matrekz42 | last post by:
Hello, I currently have a database which consists of about 100 queries. I want to create a button in a form that will run all 100 queries, but at the same time the user can pick the date range, by entering the dates. ie: textStartDate - textEndDate, in a form. This would change the date range on all the queries. What should I do? Thanks in advance.
19
1701
by: eskelies | last post by:
I have two queries. My goal is to pull a range of numbers that fall on or in a certain date range. For example, $100 on 9/1/2007 and $200 on 9/24/2007. I want the date range to pick up both the 100 and 200 dollars. From there I will sum them. The key is I only want current month. The following SQL is already written for both Queries. My issue is in the second query I receive #error. Query 1: SELECT ., Month(Date()) & "/1/" &...
0
8691
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8620
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9038
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4633
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3060
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.