Posted on 2012-08-21
Last Modified: 2012-09-09
I have a MS Access column named "MCOcompBy" which default setting set to:  Now().
When the attached details page is updated using the Update Function on details page name "Home3.aspx" I need it to log the date/time the update occured.   I have attached my details page and code behind.
Question by:BOEING39
    LVL 11

    Expert Comment

    In AccessDataSource, modify Updatecommand to ' ...[Updated] = Now(), ...' and delete the 'Updated' parameter.
    Other solution would be to use 'Updating' event of the AccessDataSource and set the parameter value there:
    e.Command.Parameters["Updated"].Value = DateTime.Now

    Author Comment

    When you refere to [Updated]  are you refering to [MCOcompBy]  in my data base as referenced above?
    LVL 11

    Accepted Solution

    Yes, you're right, it should be [MCOcompBy] instead of [Updated].
    I saw that in the parameters list is defined as string so if you use it in .NET (2nd solution) you should assign it a string value: DateTime.Now.ToString or you'll have to change parameter type to datetime

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now