Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009
    Waikato, New Zealand

    Unhappy Unanswered: What am I doing wrong?

    I have two date columns [ServiceStartDate] and [ServiceEndDate] in my data base. I am trying to run a query that places the date of the enquiry period [Start Date] as the [ServiceStartDate] where that date is prior to the Enquiry date [Start Date] or if the [ServiceStartDate] is equal to or after the Enquiry date then to use the [ServiceStartDate].
    In Design view of the [ServiceStartDate] column, in the criteria row I have entered >=[Start Date] and in the or row I have entered IIf([ServiceStartDate]<[Start Date],[Start Date])

    The problem is that it will not pickup dates entered prior to the enquiry date and only runs data entered on or after the Enquiry date.
    Can anyone help?

  2. #2
    Join Date
    Jan 2009
    Kerala, India

    What am I doing wrong?

    The expression is incomplete, complete it as follows:

    IIf([ServiceStartDate]<[Start Date],[Start Date],[ServiceStartDate]) (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

Posting Permissions

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