Results 1 to 2 of 2

Thread: Date calculation

  1. #1
    Join Date
    Aug 2003
    Posts
    1

    Date calculation

    I want to calculate "Start Date" field by using "Date Required" field and a record that contains leadtime values eg. 5 days.
    The result should be that if entered required Date is on 2/9/03 and there is 5 days leadtime the calculated start date should be 28/8/03.
    I got as far as working out that I'm using the DateDiff function in the Expression builder. But I'm not clear how I can use this.
    Any help is much appreciated

  2. #2
    Join Date
    Aug 2003
    Location
    Singapore
    Posts
    3
    Hi there
    Assuming your Date Required field is a textbox, likewise for Start Date, then perhaps u can try these codes:

    Private Sub txtDateRequired_AfterUpdate()

    Me.txtStartDate.Value=Me.txtDateRequired - 5

    End Sub

    U will need to format the textboxes to date (for e.g. Medium Date).

    Cheers...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •