Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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" ???
  #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#".


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





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