Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Unanswered: Add date automatically to another control

    We have a work Order form that we fill out. I would like as soon as the work order number is entered I would like todays date to be displated in another control.
    The 2 controls names are WorkOrderID and WorkOrderDate. Both are items in my WorkOrderTable.
    I just need to know how to write code for this. I assume you would put it under "after update" but I can't seem to figure out the code I need.

    Thank you so much,
    Michael
    Gotta to do some code

  2. #2
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    In your after update put
    ME.WorkOrderDate = Date()


    My 2 cents worth.
    Darasen

  3. #3
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271
    Will this enter the date I did the work order or will it change everytime I go back to the work order?


    michael
    Gotta to do some code

  4. #4
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    It will set the date to the current date if the WorkOderID field is changed.
    Darasen

  5. #5
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271
    Instead of after update can I put it under When changed? That way if for some reason someone wants to toggle through all the controls, it won't update unless they change something in that control??

    My objective is to enter the date once when I create the WorkOrder. And have it never change!

    Thank You,
    Michael
    Gotta to do some code

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    "enter the date once when I create the WorkOrder"

    set the default in the table to Now()

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •