Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Date Evaluation Not Make Sense
Bruce McCormick 
   
2 years ago
OK. First, stick the word "does" between the words "Date evaluation" and "not make sense" up there...

I must admit, i believe this one is from something painfully obvious that i just am way too wrapped up to see right now.

We have a table of transactions with one field being TXDate and another TXPmtCredit (I regret using "TX" but i'll deal with that later).

I run the following SQL on it:
strSQL = "SELECT ([TXPmt]) FROM tblTransaction WHERE [IDAgreement] =" & lIDAgreement & " AND TXDate >" & CDate("01/01/2025")
(i am only using the fixed date at the end trying to sort this issue out, it originally was just Date())

Notice i am writing
TXDate >
???

TXDate was the logged date of the transaction. Before today. Certainly before next New Year's Day.

Each entry in the table for this field has a date that is previous to today, but when i use < i get an incorrect total of 0. When i tried > out of frustration, i get the right answer. I went so far to check in the immediate window whether or not CDate("10/30/2024") > CDate("01/01/2025")
just because i thought i might be "losing it" entirely, but that came back as false as expected. Yet in employing that SQL in a procedure to total a specific field related to a specific Customer for a specific set of dates (simply less than, or before, today), i have to tell it that the transaction dates i want are greater than today's date, or as in the example, greater than next New Year's Day!

I am walking away from this for now; sometimes that is when the answer comes to me, but if any of you see what the heck i am doing wrong i sure would appreciate a shove in the right direction.

Mr. Rost: I NEED MORE SUBJECT LINE SPACE!!! I sound like a caveman! Uhg!
Kevin Robertson  @Reply  
           
2 years ago
strSQL = "SELECT TXPmt FROM tblTransaction WHERE IDAgreement=" & IDAgreement & " AND TXDate <#" & Date & "#"
Bruce McCormick OP  @Reply  
   
2 years ago
@ Kevin: Thank you so very much!

When i walked away last nite about all that came to me was similar to the sound you'd hear back in the 1960's at 2:00am well after the National Anthem from your television - static...

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/8/2026 6:06:21 AM. PLT: 1s