Results 1 to 3 of 3
  1. #1
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143

    Format([Enter Month],"mmmm") Only returning January

    This is probably something very simple, but it's in a long line of tiny hiccups.



    I have a report based on a query that when ran requests both the Month and Year be entered.

    The details in the report run as they should, I have no problem there, but in the Report Header I have a text box with the formula =Format([Enter Month],"mmmm") -- simple enough, right?

    The report does not ask me to enter the Month twice (once for the query and again for the formula) leading me to believe that it is taking the information from what is entered for the query.

    However, when 1 is entered, the formula displays December. When any other number (2-12) is entered, the formula displays January.

    Not sure if this has anything to do with it, but the months stored in the table and resulting query are formatted as numbers (the reason why I am only entering numbers 1-12 for the report) as they are calculated from the date in another field and do not contain a complete date -- this seemed to make queries simpler.

    What is going on?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    i dont think you want a text box asking for a month.
    you want the QUERY to ask for the month, and pull only that data.
    the text box would still display the month like you want, but the text box is linked to the asking field.
    the query field criteria: [Enter month]
    would be in the field : (month(dateFld)

    the user would enter 1, but the format would show JAN

  3. #3
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143
    Yup, that did it. Thank you!

    I kept the criteria in the original month field, but just added a field with MonthName([OrderMonth]) which works just as I need it.

    I tried first using Month([OrderMonth]) but it returned just a number, and the wrong one at that.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  2. Replies: 5
    Last Post: 05-28-2015, 03:24 PM
  3. Replies: 8
    Last Post: 07-15-2014, 05:56 PM
  4. Replies: 2
    Last Post: 04-19-2014, 02:42 AM
  5. Replies: 7
    Last Post: 07-19-2013, 11:58 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