Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Posts
    178

    Unanswered: Using a Calender and related Weeks

    Hi,

    Access 2000.

    I have a text box where a user can choose a date using a calender.

    I need the fiscal week number for that particular date. what would be the best way of auto filling another field with the week number?

    Thanking you for your help


    Aboo

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so you need a mechanism that translates true calendar dates into financial dates.

    usually that means having a financial calendar so you quickly know what date belongs to which period.

    that can be somehtign as simple as
    wkno pdno enddate

    and do a lookup to find the closest date to that enddate
    you could stroe the satrt of the financial period if you prefer. its up to you.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2006
    Posts
    178
    hey Healdem,

    Sorry Healdem I sometimes have difficulties to read. Coul you simplify your last 2 lines for me please.

    Im sorry for being a pest.

    Regards

    Aboo

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    sorry my bad proof reading (or lack of)

    not a problem
    you need a table which convert from the real world calendar to the internal financial calendar

    I'd suggest you have a simple table which stores the following
    the financial year
    the period
    the date this period starts (or ends)

    write a function (or series of functions) which retrieves the required data

    that could be
    what is the period end date for a specified period (and financial year)
    eg public function GetPeriodEndDate(byRef FinancialYear as integer, ByRef PeriodNo as integer, byVal SpecifiedDate as date) as boolean
    the ByVal means the financial year and period ni woudl be returned by the function
    the return type of boolean would depend if the function found the data, so Id suggest you set tru if the date was translated into a yer/period and false if not.
    i'll leave the rest of the function to you.. have a try at it..

    what is the period for this date
    public sub getFinancial Period(ByRef SoecifiedDate as date, byval FinancialYear as integer, byval PeriodNo as integer) as boolean
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    May 2006
    Posts
    178
    Thanks Healdem,

    I will try to incoporate this idea and see what comes about. Im guessing that ill probably be hitting you up again on here.

    Thanks

    ~aboo

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by aboo
    ...I will try to incoporate this idea and see what comes about. Im guessing that ill probably be hitting you up again on here....
    that's not a problem, that's what the forum is all about.

    I think you will learn more about Access if you make a try yourself. its easy to grab someone elses solution without thinking about he problem and more importantly learn from the process. learning about debuggiing in my books is one of he most important (and transferable skills) in system development

    good luck
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •