PC Review


Reply
Thread Tools Rate Thread

Access 2007 Date field shows Now instead of Date

 
 
bobdydd
Guest
Posts: n/a
 
      15th Jul 2011
Hi

Access 2007

I have a check box that has on the "After update" event the following
code:

If Me.chkBuyerPayInvoice = -1 Then
Me.txtBuyerPaidDate = Date
Me.txtBuyerCheckClearDate = Date
End if

But instead of it putting the Date 14/07/2011
It is putting the Now 14/07/2011 21:38:53

I just want the Date

The field is formatted to Short Date and the regional settings are dd/
mm/yyyy (UK)

Grateful for any help

Regards

 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      15th Jul 2011
On Fri, 15 Jul 2011 00:18:43 -0700 (PDT), bobdydd
<(E-Mail Removed)> wrote:

>Hi
>
>Access 2007
>
>I have a check box that has on the "After update" event the following
>code:
>
>If Me.chkBuyerPayInvoice = -1 Then
> Me.txtBuyerPaidDate = Date
> Me.txtBuyerCheckClearDate = Date
>End if
>
>But instead of it putting the Date 14/07/2011
>It is putting the Now 14/07/2011 21:38:53
>
>I just want the Date
>
>The field is formatted to Short Date and the regional settings are dd/
>mm/yyyy (UK)
>
>Grateful for any help
>
>Regards


Is there perhaps a Default Value property, either in the textbox or the table
field to which it is bound? Does the field show blank prior to checking the
checkbox?
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also http://www.utteraccess.com
 
Reply With Quote
 
bobdydd
Guest
Posts: n/a
 
      18th Jul 2011
Hi John

That put me on the right trail.
It is copying the date from an email inbox date field.

Is there any way to truncate it to just the date
without including the time?

Thanks
 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      18th Jul 2011
On Mon, 18 Jul 2011 14:00:44 -0700 (PDT), bobdydd
<(E-Mail Removed)> wrote:

>Hi John
>
>That put me on the right trail.
>It is copying the date from an email inbox date field.
>
>Is there any way to truncate it to just the date
>without including the time?
>
>Thanks


Sure; set it to Int([datetimefield])
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/For...-US/accessdev/
http://social.answers.microsoft.com/.../en-US/addbuz/
and see also http://www.utteraccess.com
 
Reply With Quote
 
bobdydd
Guest
Posts: n/a
 
      19th Jul 2011
> Sure; set it to Int([datetimefield])

Thanks John
That worked perfectly

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Access 2007 automatically clear date field after date hasexpired? stevmich Microsoft Access Macros 2 23rd Jan 2010 05:56 PM
Access 2007 Date Field Cbold Microsoft Access 1 5th Mar 2009 08:45 PM
link access 2007 date field to outlook eckebro Microsoft Access 1 3rd Feb 2009 11:39 PM
date/time field in access shows nonexistant time in databound textbox. Kyote Microsoft VB .NET 10 19th Aug 2007 05:24 PM
Access 2007 auto update a date field =?Utf-8?B?RGl5aXNmdW4=?= Microsoft Access Macros 9 16th May 2007 09:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:49 PM.