Results 1 to 6 of 6

Thread: Current Month

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Location
    Lewiston, Maine
    Posts
    128

    Smile Current Month

    Hello,

    I need to place into a textbox of a form the current month such as 10 for october 11 for november when I update a database. I also need to place into another textbox the current year. Can anyone help?

  2. #2

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Location
    Lewiston, Maine
    Posts
    128

    Month

    This is what I have now. I get a "Sub or Function not defined" error.

    VB Code:
    1. txtfield(3) = Format(Now(), "mm")
    2. txtfield(4) = Format(Now(), "yyyy")

  4. #4

  5. #5

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Location
    Lewiston, Maine
    Posts
    128

    Resolved

    Maritin, You were right, I forgot the "s" in txtfields.

    Thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width