Results 1 to 2 of 2
  1. #1
    Gabriel2012 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Nov 2012
    Posts
    31

    If statement in form field


    Hello, I have a form were the "Date of error" is entered as well as the "Period" (accounting period). Is there a way to enter an If statement into the period field so that the period will change dependant on the date that is entered in the "Date of error" field? I.E 02/02/2013 is the date of error so "2" is populated in the Period field.

    Thank you for any help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    That would require code to save the calculated value. However, why bother? Saving calculated data is usually a bad idea. The value can be calculated in query or on form/report when needed.

    What is basis for 'period' - quarterly starting with January?

    Format([Date of error], "q")

    BTW, advise no spaces or special characters/punctuation (underscore is exception) in names nor reserved words as names. If used, must enclose in [].
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Join Statement with two field relationship
    By dhogan444 in forum Queries
    Replies: 2
    Last Post: 08-09-2012, 08:30 AM
  2. Replies: 2
    Last Post: 04-27-2011, 12:02 PM
  3. If Statement to validate Field on a Form
    By ETCallHome in forum Forms
    Replies: 4
    Last Post: 04-05-2011, 05:22 PM
  4. Date Field empty if statement
    By dubsdj in forum Programming
    Replies: 4
    Last Post: 03-06-2011, 04:02 PM
  5. IIF statement to populate field
    By GriffyNJ in forum Queries
    Replies: 0
    Last Post: 10-13-2009, 10:07 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