Results 1 to 4 of 4
  1. #1
    Othy is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    4

    Getting a form field to display info when selected.

    The Issue
    I have a form that's working for 99% of what I need it to do; but I'm having one problem. The form is set up to track time spent; so naturally it has a start time and a time finished. The start time is set with a default value of Time() (access 2007). This part is working great.

    Originally, I had the finished time set the same way; but was constantly having to change the value (which kind of defeats the purpose of having it show up on its own). What I am looking to do is have the time finished field automatically display when I click in that box as though I were going to type the field.

    Solutions I've Tried
    I've tried going into the properties of the field inside the form and adding the expression "=Time()" to the "On Click" field but nothing happens when I click in the field after doing this. I've tried doing the same thing in a few other property fields and it still isn't working. I've also looked at the property sheet for the table on which the form is based, but I don't see anywhere in the table to do this.

    I have removed the default value from the time finished field so I know that is not what's causing the problem.

    All help is appreciated!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,523
    Try

    Me.TextboxName = Time()

    That would be VBA code that goes here:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Othy is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    4

    Talking Shazam!

    You are my hero!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,523
    Happy to help, and welcome to the site!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Autofill a field once a Form is Selected from Switchboard
    By AccountingStudent in forum Forms
    Replies: 3
    Last Post: 09-13-2011, 11:26 AM
  2. Replies: 1
    Last Post: 09-12-2011, 10:15 AM
  3. Replies: 4
    Last Post: 02-08-2011, 08:43 AM
  4. Replies: 3
    Last Post: 02-01-2011, 09:47 AM
  5. Replies: 13
    Last Post: 06-01-2010, 09:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums