Results 1 to 4 of 4
  1. #1
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57

    Cool using fiscal date formate "2011/12" filtering a string query will not work

    Hi All,


    Hope someone can give me some guidance, i have a form with a combo box that gives me a list of fiscal year end dates formatted like eg 2010/11, 2011/12, 2012/13 etc.
    if i change the combo box to accept only year eg 2010, 2011, 2013 etc and run the form it works fine, but if i change it to the fiscal format it does not want to see it.
    I get the date from this code in the field list FinDate: ([FinYear]-1) & "/" & Right(([FinYear]+0),2) and the criteria for it is Like [Forms]![frmStaffSelection]![cboYear] & "*" this give me the format and i get a list of fiscal dates as above good.
    but when i run the combo box and enter the fiscal years it opens a input box for FinDate asking for input, if I hard code a fiscal date Like "2011/12"& "*" into the criteria it returns nothing although there is data like it in the query.
    Hope this make a bit of sence

    Peter

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    I have 2 boxes for fiscal year.... 1 year, 1 month.
    choose 2014 in cboYr
    choose 11 in cboMo
    THEN let the form calculate start and end dates txtStartDate, txtEndDate.
    (the afterupdate of cboyr, or cbomo, would recalc the 2 text boxes according you YOUR FY.

    all reports would run off the 2 text boxes for the date range

  3. #3
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    Runman256
    Thanks for your quick reply, I will try it, will be a couple days before i have it done, i will let you know
    Peter

  4. #4
    jaymin is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Location
    gold coast Australia
    Posts
    57
    I believe what was wrong, i was trying to run a calculating field off other calculating fields and it kept asking me to enter data, but when i used a calculating field that used a field from the table it worked.
    i used this formula to calculate the fiscal year for the year date - FYear: Year([OTDate])-IIf([OTDate]<DateSerial(Year([OTDate]),6,0),1,0), this gave me the minor year of the fiscal year e.g. 2013 of the fiscal year of 2013/14, the 6 is the month you want for the change over, the 1,0 is for the iif statement this will minus a year if the month is = or less that June = 2013, if it it is greater than 6 = July the minor year would be the same year 2014, and to get the format for the combo box to work when staff selected the 2013/14, i used a function to check what was selected e.g. 2013/14 then had some if / then statements to change the text box value to what i wanted, then pointed the filter criteria on the query to it. work s fine
    Regards
    Peter

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

Similar Threads

  1. Replies: 3
    Last Post: 12-06-2014, 03:59 AM
  2. Replies: 6
    Last Post: 06-07-2013, 09:45 AM
  3. Replies: 2
    Last Post: 11-26-2012, 11:12 PM
  4. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  5. Replies: 4
    Last Post: 03-14-2012, 09:05 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