Trying to add 1 month to a date in a text box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rob Amor
    New Member
    • Sep 2010
    • 30

    #1

    Trying to add 1 month to a date in a text box

    I am writing a memberships database. I want to be able to add 1 month to the membership expiry date using a control button. the date field is called Memexpires. and I have tried using

    DateAdd("m",1,[MemExpires])

    in the on click event of my command button. I get "Compile error: expected: =" in the vb window?

    I have looked in several places on the web and I think that they are telling me to do the above but I am obviously missing something.

    I am self taught and have never posted on a site like this before so any help would be greatly appreciated.

    Thanks
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    I'm afraid it was as simple as the error message implied. You wanted the "=" at the front as in :
    Code:
    =DateAdd("m",1,[MemExpires])
    So near already, just missed by a smidgen :)

    Welcome to bytes!

    Comment

    • Rob Amor
      New Member
      • Sep 2010
      • 30

      #3
      Thanks for replying and thanks for your help. Can't believe I didn't try to put the = sign in :(

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        No worries. Glad I was able to help :)

        Comment

        Working...