Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Posts
    8

    Exclamation Unanswered: create new field

    My database has 3 date fields, Actual, Forcast and Scheduled.

    I need to create a new field that is derived from the above 3...

    Populate the new field with Actual.
    If Actual is bland then populate with Forcast.
    If Actual and Forcast are blank then populate with Scheduled
    else leave blank.


    How can I create this field??

    Thanks in advance.

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: create new field

    Originally posted by deb
    My database has 3 date fields, Actual, Forcast and Scheduled.

    I need to create a new field that is derived from the above 3...

    Populate the new field with Actual.
    If Actual is bland then populate with Forcast.
    If Actual and Forcast are blank then populate with Scheduled
    else leave blank.


    How can I create this field??

    Thanks in advance.
    once you have the column in the table write an update query with iif's

    iif(actual is not null, actual,iif(actual is null and forcast is not null, forcast,iif(actual is null and forcast is null and scheduled is not null, scheduled, iif(actual is null and forcast is null and schedualed is null, null))))

    something along those lines should fix you right up
    Jim

Posting Permissions

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