MS Access / VB script help...
Results 1 to 3 of 3

Thread: MS Access / VB script help...

  1. #1
    The new kid Array Digit Treesloth's Avatar
    Join Date
    Sep 2004
    New West
    Driving Miss Daisy

    MS Access / VB script help...

    I have a really simple MS Access XP form that has a bunch of text field and a date field called last_updated.

    I would like to write an event that updates the last_updated to the current date when any of the other text fields are changed.

    I have chosen to use the event -> Private Sub Form_AfterUpdate()

    but am not at all familiar with VBScript to fill in the remaining details to set the last_updated field to the current date. Can anyone help?
    Digital Treesloth

    Doc Venture to Mike Soriyama: Oh C'mon! You're gonna kill me because I had fake sex on graph paper with a girl who barely spoke to you in real life?!

  2. #2 Array Stewy's Avatar
    Join Date
    Aug 2003
    Maple Ridge
    2007 GSX-R750
    "Nitrous is like a hot girl with STD’s… You know you want to hit it, but you’re afraid of the consequences"

    2007 Suzuki GSX-R 750
    2014 BMW X5 xDrive 35d M Sport
    2007 Audi A4 S-Line

  3. #3
    Registered User Array Fotura's Avatar
    Join Date
    May 2005
    Inbetween bikes now. Thanks for bringing up bad feelings.

    What you are doing isn't too difficult. I do have a couple of questions that will help answer. You can also PM me and we can take this offline as well.

    The tables you are using are in the Access database and not imported or linked?

    The objects are bound to fields in your tables, especially your date?

    Are you able to do an Update method as is?

    If you try something like:

    Text2.Text = Now

    Add that to your update event and it should work.

    I would not put this in the Form_AfterUpdate event. Since it will set the date after you've updated the record.

    Hope this helps, if not then send me a PM and I'll see if I can help.
    Life is an STD with no cure and 100% fatality rate.

Posting Permissions

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