Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2012
    Posts
    56

    Unanswered: text boxes on form

    Hello everyone,
    I have several text boxes on a main form with a table as the data source

    Date
    WeekNumber
    MonthNumber
    YearNumber

    The date is filled in with the default of today. I want to fill the next box weekNumber based on the first box and then the one after with the Month number based on the first box and the same for the year. It may seem a weird thing to do but it makes creating reports so easy

    Thanks Bob

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Search in Acces help for the DatePart() function.
    Have a nice day!

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Or, depending on how you're using it:

    WeekNumber = Format(Date(),"ww")

    MonthNumber = Format(Date(),"mm")

    YearNumber = Format(Date(),"yyyy")


    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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