Results 1 to 6 of 6
  1. #1
    edieb is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    5

    Angry Date Functions


    I have a date function "Expr9: Choose(Month(Date()),7,8,9,10,11,12,1,2,3,4,5,6)" placed in a query that worked in Access 2010 and refuses to work in Access 2013. This expression allowed the month number for July to enter as number 1, August as number 2 and so on. July being the first month for the new fiscal year. What do I say different that will give the same results in Access 2013?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I am not finding anything on the web that suggests the choose function is not available in 2013.

    The fact that you are using Expr9 as an alias causes me to believe that this query was imported into the DB before a supporting table was imported/available.

    Right now, all that function does is return the current period. Is your function suppose to be related to a field in a table or the current month? The only other thing I can think would be to try dropping the parenthesis after date. don't really know though.

    Maybe
    Date
    Instead of
    Date()

  3. #3
    edieb is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    5
    The query is an append query. The expression is entering into a field. I would get a dialogue statement saying it was not a valid date expression.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Assuming the append to field is correct and your query is otherwise functioning, did you try dropping the parenthesis? I don't have 2013 so I can not test this.

  5. #5
    edieb is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    5
    Yes, I removed and added parenthesis. Unfortunately I don't have access to the database that we are updating to 2013 version at this time. I just have the 2010 on my desk top.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by edieb View Post
    Yes, I removed and added parenthesis. Unfortunately I don't have access to the database that we are updating to 2013 version at this time. I just have the 2010 on my desk top.
    SQL should require the parenthesis but I thought it might be worth a try. When you get to the 2013 version I would double check the query and make sure the append to field is good to go. Test the function in a test query based on a single copied table in the new version. You need to isolate the problem. Determine if it is the function or the query object.

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

Similar Threads

  1. Date/Time Functions
    By Cybercow in forum Code Repository
    Replies: 1
    Last Post: 11-22-2012, 09:30 AM
  2. F functions
    By dref in forum Access
    Replies: 1
    Last Post: 08-23-2012, 06:13 AM
  3. Date functions in a query
    By ccordner in forum Queries
    Replies: 1
    Last Post: 01-27-2012, 01:45 PM
  4. sum functions
    By trippers in forum Queries
    Replies: 2
    Last Post: 08-04-2010, 07:09 PM
  5. using Functions to validate a date field
    By jamin14 in forum Programming
    Replies: 1
    Last Post: 03-18-2010, 12:46 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