Results 1 to 6 of 6
  1. #1
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481

    Copy the date from otherfield if IsNull!

    Hi,


    I need help to organize the fields as below:

    Fields:
    ScheduleStartDate
    ActualStartDate

    Requirement: If the "ActualStartDate" fields is null or date is not entered yet then it shall show/copy the date of "ScheduleStartDate"

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    If (isnull(actualstartdate)= true,[schedulestartdate], [actualstartdate])

  3. #3
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Dear Sir

    Thanks but i applied it on my form and its giving error #Name? and the expression turns into:

    =If(IsNull([actualstartdate])=True,[schedulestartdate],[actualstartdate])

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Sorry try iif

  5. #5
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Hi

    Same error still exists.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The same syntax but with IIf should work. Make sure the field names are correct, and also that there's no textbox with the same name as the fields.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 07-15-2015, 12:42 PM
  2. Replies: 1
    Last Post: 01-21-2015, 11:33 PM
  3. How to copy the month of a date
    By rudenberg2013 in forum Programming
    Replies: 2
    Last Post: 11-04-2013, 05:37 AM
  4. If Date IsNull
    By burrina in forum Forms
    Replies: 6
    Last Post: 01-10-2013, 07:23 PM
  5. Replies: 2
    Last Post: 11-26-2012, 11:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums