Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 August 19th, 2007, 08:24 PM
Registered User
 
Join Date: Aug 2007
Location: Lyons, ACT, Australia.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default MS Date Time picker change

Hi
I'm still really new to Access and I hope I'm not wasting people's time.
The following code worked when the textbox was Date/time with an input mask but since I changed it to MS DTPicker (superiors want a pretty calendar to choose the date) it won't work. The control sources are the same and I have tried rewriting the code to include the names of the DTPickers but nothing happens. It just won't update the "status" text box.

Private Sub Final_Date_Delivered_AfterUpdate(Cancel As Integer)

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmCoordReq"

    Me![Status] = "Open"

    If ((Me![Final Date Delivered] <= Me![Date of delivery]) Or (Me![Final Date Delivered] <= Me![Date of extension])) Then

        Me![Status] = "Completed on time"

    ElseIf ((Me![Final Date Delivered] > Me![Date of delivery]) Or (Me![Final Date Delivered] > Me![Date of extension])) Then

        Me![Status] = "Completed late"

    End If

    DoCmd.Save acForm, stDocName

End Sub

Thanks
Reply With Quote
  #2 (permalink)  
Old August 20th, 2007, 06:21 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Is this giving you any errors, or just not working? Which date is the date picker? If it is Final_Date_Delivered, you may want to put this on the On Dirty event. Alternatively, make sure it is on the Before Update event of the form.




mmcdonal
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
Date and Time Picker snufse ASP.NET 2.0 Basics 1 March 19th, 2008 06:35 AM
Date and time picker anukagni Access 3 June 21st, 2007 12:16 AM
Date Time Picker goraya C# 1 June 4th, 2004 07:01 AM
How to Change value in Date Time Picker, Help PLZ shopgirl Classic ASP Professional 2 April 29th, 2004 08:34 PM
Date time picker GrindBright BOOK: Beginning Access VBA 2 November 18th, 2003 05:01 PM



All times are GMT -4. The time now is 12:31 AM.


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