A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Selecting dates through a query



 
 
Thread Tools Display Modes
  #1  
Old May 10th, 2005, 02:37 PM
Susan R
external usenet poster
 
Posts: n/a
Default Selecting dates through a query

I have a production table with 5 unqiue date fields. I am trying to develop
a query by which I can summarize data from all date fields based on one date
field. For example, if the primary date field is 5/10/05, I want to select
all records from all five date fields that have a 5/10/05 date. Any
suggestions?
--
Susan R
  #2  
Old May 10th, 2005, 03:13 PM
Rick B
external usenet poster
 
Posts: n/a
Default

Just put the same criteria under each of the date fields. Put them on
separate lines if you wish to create an "OR" condition.

--
Rick B



"Susan R" wrote in message
...
I have a production table with 5 unqiue date fields. I am trying to

develop
a query by which I can summarize data from all date fields based on one

date
field. For example, if the primary date field is 5/10/05, I want to

select
all records from all five date fields that have a 5/10/05 date. Any
suggestions?
--
Susan R



  #3  
Old May 10th, 2005, 04:14 PM
Susan R
external usenet poster
 
Posts: n/a
Default

That was the first thing I tried. I am using =[Date] in each field where
Date is the name of the field which contains the primary date. =[Date] works
in one field, but when I add that criteria to the other fields I get no
results.
--
Susan R


"Rick B" wrote:

Just put the same criteria under each of the date fields. Put them on
separate lines if you wish to create an "OR" condition.

--
Rick B



"Susan R" wrote in message
...
I have a production table with 5 unqiue date fields. I am trying to

develop
a query by which I can summarize data from all date fields based on one

date
field. For example, if the primary date field is 5/10/05, I want to

select
all records from all five date fields that have a 5/10/05 date. Any
suggestions?
--
Susan R




  #4  
Old May 10th, 2005, 04:18 PM
Rick B
external usenet poster
 
Posts: n/a
Default

DATE is a reserved word in Access. You need to reevaluate your field names.


--
Rick B



"Susan R" wrote in message
news
That was the first thing I tried. I am using =[Date] in each field where
Date is the name of the field which contains the primary date. =[Date]

works
in one field, but when I add that criteria to the other fields I get no
results.
--
Susan R


"Rick B" wrote:

Just put the same criteria under each of the date fields. Put them on
separate lines if you wish to create an "OR" condition.

--
Rick B



"Susan R" wrote in message
...
I have a production table with 5 unqiue date fields. I am trying to

develop
a query by which I can summarize data from all date fields based on

one
date
field. For example, if the primary date field is 5/10/05, I want to

select
all records from all five date fields that have a 5/10/05 date. Any
suggestions?
--
Susan R






  #5  
Old May 10th, 2005, 07:52 PM
Susan R
external usenet poster
 
Posts: n/a
Default

I changed all fields titled Date to CurrentDate and get the same results.
When the criteria is placed in one date field, such as Batch1DateComplete,
the selection is correct; however, when I place the criteria in another
field, such as Batch2DateComplete, I get no results.
--
Susan R


"Rick B" wrote:

DATE is a reserved word in Access. You need to reevaluate your field names.


--
Rick B



"Susan R" wrote in message
news
That was the first thing I tried. I am using =[Date] in each field where
Date is the name of the field which contains the primary date. =[Date]

works
in one field, but when I add that criteria to the other fields I get no
results.
--
Susan R


"Rick B" wrote:

Just put the same criteria under each of the date fields. Put them on
separate lines if you wish to create an "OR" condition.

--
Rick B



"Susan R" wrote in message
...
I have a production table with 5 unqiue date fields. I am trying to
develop
a query by which I can summarize data from all date fields based on

one
date
field. For example, if the primary date field is 5/10/05, I want to
select
all records from all five date fields that have a 5/10/05 date. Any
suggestions?
--
Susan R






  #6  
Old May 10th, 2005, 10:34 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

Are you putting the criteria on the same line in the query grid, or on
separate lines? You need to put each one on a separate line.

When you put the critieria on the same line, they're ANDed together, so
you'll only get records where Batch1DateComplete equals today AND
Batch2DateComplete equals today.

When you put them on separate lines, they're ORed together, so that you'll
get records where Batch1DateComplete equals today OR Batch2DateComplete
equals today.

Just a comment, though. The existence of fields with names like
Batch1DateComplete and Batch2DateComplete usually indicates that you haven't
normalized your tables. With a properly normalized database, you most likely
wouldn't be needing to check 5 different fields for the same value.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Susan R" wrote in message
...
I changed all fields titled Date to CurrentDate and get the same results.
When the criteria is placed in one date field, such as Batch1DateComplete,
the selection is correct; however, when I place the criteria in another
field, such as Batch2DateComplete, I get no results.
--
Susan R


"Rick B" wrote:

DATE is a reserved word in Access. You need to reevaluate your field
names.


--
Rick B



"Susan R" wrote in message
news
That was the first thing I tried. I am using =[Date] in each field
where
Date is the name of the field which contains the primary date. =[Date]

works
in one field, but when I add that criteria to the other fields I get no
results.
--
Susan R


"Rick B" wrote:

Just put the same criteria under each of the date fields. Put them
on
separate lines if you wish to create an "OR" condition.

--
Rick B



"Susan R" wrote in message
...
I have a production table with 5 unqiue date fields. I am trying
to
develop
a query by which I can summarize data from all date fields based on

one
date
field. For example, if the primary date field is 5/10/05, I want
to
select
all records from all five date fields that have a 5/10/05 date.
Any
suggestions?
--
Susan R








  #7  
Old May 12th, 2005, 04:13 AM
Larry Daugherty
external usenet poster
 
Posts: n/a
Default

Hi Susan,

I've looked at about 4 other replies and believe your approach might
be flawed. Firstly, why do you have several fields in the same record
that capture the same data? I'm going to assume you don't really want
to do that. Whale it's possible to bang away at it and get the
results you want out of a flat-file construct, you'll probably face
the same problem again.

What is the significance of each of those date capturing fields? It
is interesting to me that you see the date field as higher in the
hierarchy than some subordinate records.

That gives me the impression that you are tracking something and that
some big event triggers a date entry and that there are one or more
records associated with each date entry.

Please post back describing what your application is intended to do -
in a broad sketch and then in a little more detail? Would you then
list your tables and their field names and any relationships between
them. Describe any queries you have working or almost working.

HTH
--
-Larry-
--

"Susan R" wrote in message
...
I have a production table with 5 unqiue date fields. I am trying to

develop
a query by which I can summarize data from all date fields based on

one date
field. For example, if the primary date field is 5/10/05, I want to

select
all records from all five date fields that have a 5/10/05 date. Any
suggestions?
--
Susan R



  #8  
Old May 12th, 2005, 04:39 AM
roy jose moe
external usenet poster
 
Posts: n/a
Default


"Susan R" wrote in message
news
That was the first thing I tried. I am using =[Date] in each field where
Date is the name of the field which contains the primary date. =[Date]

works
in one field, but when I add that criteria to the other fields I get no
results.
--
Susan R


"Rick B" wrote:

Just put the same criteria under each of the date fields. Put them on
separate lines if you wish to create an "OR" condition.

--
Rick B



"Susan R" wrote in message
...
I have a production table with 5 unqiue date fields. I am trying to

develop
a query by which I can summarize data from all date fields based on

one
date
field. For example, if the primary date field is 5/10/05, I want to

select
all records from all five date fields that have a 5/10/05 date. Any
suggestions?
--
Susan R






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving from xBase/Clipper [email protected] New Users 1 February 3rd, 2005 07:25 PM
adding 2 fields including null entries Jesse Running & Setting Up Queries 26 January 18th, 2005 05:31 PM
Still Hoping for help with a Query problem Don Sealer Using Forms 15 November 13th, 2004 06:24 AM
Newbie? Do I use Report or Query John Egan New Users 11 June 28th, 2004 08:31 PM
Dates In a CrossTab query Box 666 New Users 1 May 21st, 2004 04:01 AM


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


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