Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 17th, 2004, 08:23 PM
rcretti rcretti is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 rcretti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Click to update date field

In updating paid annual fee for a record, this code enabled me to add a command button to the form so the user can just click to add a year to the current field date.

Option Compare Database
Private Sub cmdAddyear_Click()
Dim yearadd As Date
Dim curdate As Date
Forms![New Record Form].Controls![Paid Until].SetFocus
If Forms![New Record Form].Controls![Paid Until].Text <> "" Then

curdate = Forms![New Record Form].Controls![Paid Until].Text
yearadd = DateAdd("yyyy", 1, curdate)
Forms![New Record Form].Controls![Paid Until].Text = yearadd

End If

End Sub

rnrcretti@commspeed.net

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Click to update date field


Thread Tools  Search this Thread 
Search this Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT