Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2014

    Question Unanswered: Check if today is between two dates in subform

    Hi all
    using access 2013
    I have a form called (personal) with fields called (MyId) and (MyName) the form has a subform called (vacations) ... they related together withe (MyId) record .... so when i sycle through records in (personal) form .. the subform ( vacations) shows the related records

    subform (vacations) has two fields called (start_vac) and (end_vac) .. which shows two dates

    Now ... I want to colored the field (MyName) to Red if today falls between (start_vac) and (end_vac) else the color turns green

    I tried the code in the main form load

    If Date >= Vacations![Start_Vac] And Date <= Vacations![End_Vac] Then
    Me.MyName.ForeColor = vbRed
    Me.MyName.ForeColor = vbGreen
    End If
    but it colored all the records in the main form ... i want to colored only the record which related with (MyId) in the subform

    Last edited by f.dragon; 02-24-14 at 14:23.

  2. #2
    Join Date
    Feb 2014
    any help pls ?

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 14
    What in my previous post don't you understand?
    Have a nice day!

Posting Permissions

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