I need help creating a button that when I push it , it will put the current time and date into a text field. RRS feed

  • Question

  • I am writing a computer aided dispatch program and I have tried using the below info on the button event procedure but it keeps returning an error ( see below error ) and I don't know what I am doing wrong.

    the field is called DISPATCHED  and I created a button called DISPATCHNOW.


    Private Sub DISPATCHNOW_Click()
    Me.DISPATCHED = Now()
    End Sub

    The error msg I get is below.  Can someone please tell me what I am doing wrong?

    I have the field DISPATCHED formatted for Date/Time.

    I want to create additional fields for ARRIVED AND FINISHED but I cannot do it until I get this problem solved.

    Thanks in Advance



    The expression On Click you entered as the event property setting produced the following error: a problem occurred while Microsoft Access was communicating with the OLE server or ActiveX control.

    Thursday, April 13, 2017 10:23 PM


  • Solved.  I figured something else was going on so I created a new blank database

    and copied the tables and forms to it and it worked. Thanks

    Friday, April 14, 2017 2:59 PM

All replies