• Simple Insert Date Code (Access 2000)

    Author
    Topic
    #358085

    I have a an Access 2k db with a main form and 4 subforms. On these forms I have a few controls that take a date and I have written some macros that enable me to double-click the control to insert today’s date. Where the control is named ‘Date’ (on the form and sub-forms) I need only one macro but I have to write separate macros for the other controls. I would like to write some simple code that does the job of the macros and I feel sure I should be able to do it with one piece of code but I can’t find a way of selecting the current control without actually naming it specifically. Can this be done?

    Viewing 0 reply threads
    Author
    Replies
    • #533421

      Screen.ActiveControl is the currently active control. To see the name of the control, use: = Screen.ActiveControl.Name

    Viewing 0 reply threads
    Reply To: Reply #533537 in Simple Insert Date Code (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel