Update Date

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • matthew.newsome@npower.com

    #1

    Update Date

    I have 4 fields on a form, they are simple drop downs, which can be
    changed throughout the life of a record.

    I have a date field that users change when they changeone of the four
    drop downs, sort of a last update date.

    Can I automate the date field to change to to whatever the date is
    when a drop down is changed.

    Thanks

    Matt

  • Keith Wilby

    #2
    Re: Update Date

    <matthew.newsom e@npower.comwro te in message
    news:1171981190 .333120.41820@v 33g2000cwv.goog legroups.com...
    >I have 4 fields on a form, they are simple drop downs, which can be
    changed throughout the life of a record.
    >
    I have a date field that users change when they changeone of the four
    drop downs, sort of a last update date.
    >
    Can I automate the date field to change to to whatever the date is
    when a drop down is changed.
    >
    Thanks
    >
    Matt
    >
    Yes, put this code in your combo box's after update event:

    Me.txtMyTextBox = Date

    HTH - Keith.



    Comment

    • matthew.newsome@npower.com

      #3
      Re: Update Date

      Hi Keith, I get an error message saying MS Access cant find macro ME.
      am i been thick.

      I have used:-

      Me.txtText543 = Date

      Thanks

      Matt

      Comment

      • Keith Wilby

        #4
        Re: Update Date

        <matthew.newsom e@npower.comwro te in message
        news:1171986212 .340366.136150@ l53g2000cwa.goo glegroups.com.. .
        Hi Keith, I get an error message saying MS Access cant find macro ME.
        am i been thick.
        >
        I have used:-
        >
        Me.txtText543 = Date
        >
        Thanks
        >
        Matt
        >
        You need to add the code to a class module - open your form in design view.
        Select your combo box, then on the properties box select the "Event" tab.
        In the After update event, select "[Event Procedure]", then click just to
        the right of the white box area. This should open the class module and
        place the cursor where the code needs to go.

        "Me" is a keyword and refers to the current class module. Your text box is
        an object associated with the class module, so when you type "Me." (note the
        full stop/period) you should get an "intellisen se" list containing the name
        of your text box. Select the name from the list and that should do the
        trick.

        HTH - Keith.



        Comment

        • matthew.newsome@npower.com

          #5
          Re: Update Date

          On 20 Feb, 16:04, "Keith Wilby" <h...@there.com wrote:
          <matthew.news.. .@npower.comwro te in message
          >
          news:1171986212 .340366.136150@ l53g2000cwa.goo glegroups.com.. .
          >
          Hi Keith, I get an error message saying MS Access cant find macro ME.
          am i been thick.
          >
          I have used:-
          >
          Me.txtText543 = Date
          >
          Thanks
          >
          Matt
          >
          You need to add the code to a class module - open your form in design view.
          Select your combo box, then on the properties box select the "Event" tab.
          In the After update event, select "[Event Procedure]", then click just to
          the right of the white box area. This should open the class module and
          place the cursor where the code needs to go.
          >
          "Me" is a keyword and refers to the current class module. Your text box is
          an object associated with the class module, so when you type "Me." (note the
          full stop/period) you should get an "intellisen se" list containing the name
          of your text box. Select the name from the list and that should do the
          trick.
          >
          HTH - Keith.www.keithwilby.com

          Keith, thats great thanks for your help, if you do read this do you
          know of a good Access book I could buy to help me further, about this
          level (little bit of VB)

          Thanks again

          Matt

          Comment

          • Keith Wilby

            #6
            Re: Update Date

            <matthew.newsom e@npower.comwro te in message
            news:1172054974 .160114.52870@h 3g2000cwc.googl egroups.com...
            >
            Keith, thats great thanks for your help, if you do read this do you
            know of a good Access book I could buy to help me further, about this
            level (little bit of VB)
            >
            Hi Matt, try this or just search Amazon's book section for "microsoft
            access":



            Keith.


            Comment

            Working...