Results 1 to 6 of 6
  1. #1
    rickn is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    7

    Default Date in Date Fields

    I have two date fields that I want to default to a certain date.
    If either of these fields are null CustDueDateCommitted or CustDueDateRequested the date from CustDueDateRequested will update these two date fields. Otherwise, if a date is in either the two fields CustDueDateRequested will not update these two fields.

    is this possible?

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I am noticing an issue with your request.

    1. if either is null, CustDueDateRequested will do both.
    2. If either is not null, it wont update.

    if Committed is not null
    and
    Requested is null
    then ?

  3. #3
    rickn is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    7
    I appologize.
    The CustDueDateOriginal date field will only give a default date to the CustDueDateCommitted if this field is null; and will only give a date to the CustDueDateRequested field if this is null. Otherwise, a date will be manually entered in the CustDueDateCommited CustDueDateRequested fields.

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    So for either field, if its null, the default will be CustDueDateOriginal.

    iif(isNull(CustDueDateCommitted), CustDueDateOriginal, whatever-you-want)

    replace the "whatever-you-want" with however you plan on entering the date.

    basical logic goes If, then, else. so were checking to see if CustDueDateCommitted is null. If it is, set it to CustDueDateOriginal. else, whatever-you-want.

    If this solves your issue, please mark thread solved.

  5. #5
    rickn is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    7
    What would be the option if CustDueDateOriginal was null at the onset, and then when the user enters a date in the CustDueDateOriginal, both the CustDueDateCommitted CustDueDateRequested if they are null? Reason is, at first the fields are null for data entry has occured, they the user enters in the date for CustDueDateOriginal.

  6. #6
    rickn is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    7
    I acutally used the BeforeUpdate Event for this and works great. That way the defaultis as above and the user can still enter date information afterwards.
    Thanks

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

Similar Threads

  1. Default Calculated Date Value
    By HMEpartsmanager in forum Forms
    Replies: 17
    Last Post: 09-12-2012, 08:37 AM
  2. Set Calendar to default to today's date
    By RickM in forum Access
    Replies: 1
    Last Post: 02-22-2009, 04:51 AM
  3. one date entered to hit 3 fields in one table how?
    By techexpressinc in forum Queries
    Replies: 0
    Last Post: 12-10-2008, 10:43 AM
  4. problem in splitting Date and time fields
    By swaroop1012 in forum Queries
    Replies: 1
    Last Post: 11-22-2008, 11:29 AM
  5. Date Calculation within same fields
    By mslieder in forum Queries
    Replies: 3
    Last Post: 01-26-2006, 10:08 AM

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