Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional Access 2013 Programming
This is the forum to discuss the Wrox book Professional Access 2013 Programming by Teresa Hennig, Ben Clothier, George Hepworth, Dagi (Doug) Yudovich; ISBN: 978-1-118-53083-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Access 2013 Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 7th, 2014, 06:14 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date Parameters in Query

Some great info in your book, thanks.
I have discovered an error however:
If you define a Parameter as a Date or Date with Time and the parameter field is not populated then instead of the parameter value being NULL as stated access Web apps return the SQL Server default for an undefined date that being 1/1/1900 12:00:00am.

So the partial SQL string listed on page 254 of:
"... OR [pdatScheduleDateFrom] IS NULL...
will NEVER be true!

What suggestions do the authors have to better match an empty entry?

Perhaps:
OR [pdatScheduleDateFrom] ="1/1/1900 12:00:00am" ???
Reply With Quote
  #2 (permalink)  
Old July 26th, 2014, 07:37 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2014
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for sharing, Brian.

I just tested that and indeed a default value is set. I'm fairly sure that was not the case when we were writing the book. Yes, you could use "=#1900-01-01 00:00:00#".
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameters: Page 90, Open a Report Based on a Parameters Query JohnLiu2012 BOOK: Access 2010 VBA Programmer's Reference 2 July 9th, 2012 02:35 AM
Date Range Parameters tachtenberg Reporting Services 0 April 2nd, 2008 03:34 PM
Getting Query parameters from a Form DrCruces Access 6 December 13th, 2006 05:42 AM
Date based query when date is nvarchar MichaelTJ SQL Language 4 January 12th, 2004 09:57 PM
Convert String Date to Date for a SQL Query tdaustin Classic ASP Basics 4 July 7th, 2003 06:01 PM



All times are GMT -4. The time now is 10:56 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.