Sabtu, 29 April 2017

Re: [MS_AccessPros] Updating a date field with criteria

 

Khalid-


Me.MembershipExpireDate = DateSerial(Year(Me.MembershipStartDate) + 2, 7, 1)

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Apr 29, 2017, at 10:18 AM, khalidtanweerburrah@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



Hi all,


On my form "Add New Member" there is a date type field "MembershipStartDate".


The requirement is that after update of this control, other date type field " MembershipExpireDate" may be updated with the following conditions:


Private Sub MembershipStartDate_AfterUpdate()

    If cboMembershipType <> "FM" Or cboMembershipType <> "HM" Or cboMembershipType <> "LM" Then

   ' MembershipExpireDate Day should be 01

   '.MembershipExpireDate Month should be 07

   ' This means first day and month of financial year

   ' Finally, MembershipExpireDate Year should be MembershipStartDate + 2

    End If


End Sub


Help required please.

Khalid



 



__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar