Greetings ... I have a table named Harms and Steven with a field named
inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any
inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing
wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#)) 3 2586 ra*********@hot mail.com wrote: Greetings ... I have a table named Harms and Steven with a field
named inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#))
Huh? DateSerial is for converting something to a date... no idea what
you're doing with it.
How about something like:
WHERE Year(Inspection Date)=2004
Designing a "totals" query in the design grid produces:
SELECT [Harms and Steven ].inspectionID, Count([Harms and
Steven ].inspectionID) AS CountOfinspecti onID FROM [Harms and Steven ]
WHERE ((([Harms and Steven ].[inspection date]) Between #1/1/2004# And
#12/31/2004#))
GROUP BY [Harms and Steven]. inspectionID
- where "inspection ID" = the unique inspection record key field
-Ed
<ra*********@ho tmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. . Greetings ... I have a table named Harms and Steven with a field named inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#))
The DateSerial function requires 3 arguments: a year, a month and a day.
Try WHERE Year([inspection date]) = 2004
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
<ra*********@ho tmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. . Greetings ... I have a table named Harms and Steven with a field named inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#)) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Harvey |
last post by:
Hi,
I try to write an asp query form that lets client search any text-string and
display all pages in my web server that contain the text. I have IIS 6.0 on a
server 2003. The MSDN site says there is a sample file called Ixtrasp.asp,
but I could not find it in my system although I installed indexing service. I
followed the steps in MSDN site to create a basic .asp query form (too long
to post it here), but it always displays:
No...
|
by: PMBragg |
last post by:
ORINGINAL Post
>Thank you in advance. I'm trying to pull all inventory items from December
>of the previous year back to 4 years for my accountant. I know this can be
>done, but I'm drawing a blank. I've tried;
>
>DateDiff("y",-4,DateIn) and get errors
>
>Please any assistance would be greatly appreciated.
>
|
by: Jeremy Wallace |
last post by:
I have some code that uses DateSerial to populate a couple of text boxes on
a form. I was doing some testing this afternoon and found that I get funny
values if the year supplied is 99. 98 works fine. 04 works fine. 1999 works
fine. 100 works fine. But 98 gives a funny value. Anyone have thoughts on
why, or how to re-form the dateserial call to deal with this?
Here's some results from the immediate window:
?(DateSerial(98 , 12+ 1, 1)) -...
|
by: ralph_noble |
last post by:
Greetings ... I have a table named Harms and Steven with a field named
inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any
inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing
wrong?
Thanks.
|
by: Kenny |
last post by:
I am having issues with the "Date.ToOADate" method in
VB .NET. I understand that in VB6 the function DateSerial
gives an internal representation of the date.
When I use the DateSerial method in VB .Net, dragging the
mouse over to the statement, VB .NET reports the following
"Conversion from 'Date' to "Double' requires calling
the 'Date.ToOAdate' method.
When I tyoe this method in, the syntax checker undelines
| |
by: jerry.ranch |
last post by:
I see that DateSerial can be used to "concatenate", in a way, three
fields DateSerial(year, month day) into a date field (if year , month
and date are numeric values). Unfortunately, my Month field is Text
(January, February etc).
What function is used to convert text month to numerical 1-12?
Thanks
Jerry
|
by: woooopa |
last post by:
Something like this...
MAX (DateSerial(!,!,!))
|
by: RZ15 |
last post by:
Hi,
I have a query that calculates the sum of branch transfers for the current quarter. Here is my Quarter-to-Date field:
QTD-In: Sum(CCur(IIf(="TRN" And Between DateSerial(Year(Date()),Int((Month(Date())-1)/3)*3+1,1) And DateSerial(Year(Date()),Int((Month(Date())-1)/3)*3+4,0),*!,0)))
Now, I need to make sure I understand the DateSerials, which I think I do but I'd rather be safe than sorry.
For DateSerial(Year(Date()),...
|
by: ringer |
last post by:
On a form I have a combo where a month is entered. It shows the month names
in column one, but it is bound to column two where each month's corresponding
number is, ie Jan=1, Feb=2, etc. So selecting April returns 4. Also on the
form I have a text box where a number is entered and used as the date of the
month in the aforementioned combo box.
I pull those numbers (month number from the combo and date number from the
text box) together...
|
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...
|
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,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |