Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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
 
Old December 7th, 2006, 01:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Heh, heh... My point was that

    dtNewDate = DatePart("m",rs("Scheduled_Review_Date")) & "/1/2007"

returns a STRING, whereas

    dtNewDate = DateSerial(2007, Month(Me.Scheduled_Review_Date), 1)

returns a DATE. Isn't it a date you want?



Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old December 7th, 2006, 01:31 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Oh, yeah. But since the variable is a Date, it types the string when it takes it, so it ends up the same.

There's more than one way to skin a cat... but not many where the cat is going to like it.


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Forum Chapter 16 - changing the dates mr_badger BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 31st, 2008 07:50 PM
Updating Excel with Form fields nancy Classic ASP Professional 6 April 7th, 2006 02:18 PM
Changing textboxes to hidden fields - HELP!!! jroxit ASP.NET 1.0 and 1.1 Basics 4 February 10th, 2006 07:46 PM
Error when changing 'Link Child Fields' property JackNimble Access 3 October 25th, 2004 03:21 PM
Updating table fields ppenn Access VBA 2 September 20th, 2003 06:09 PM





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