Time in access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cflarida@yahoo.com

    #1

    Time in access

    I have a simple form that will gather it's information from a card
    reader. The form has 3 fields SSN which is gathered from the card
    swipe. Can I make access automaticly hit enter when it hits the last
    digit in this field, it will always be 11 digits (000-00-0000)? I wold
    also need it to to fill in 2 other fields Date, and Time. I would need
    the exact Date and time of the swipe or entry. How do I pull from the
    PC's time to do this. At the moment I have the Date field set for
    defualt value =date() and the Time field default value set =time() but
    it populates the date and time that right after the last entry. If
    anyone has anything that would work please let me know. Thanks

  • Rick Brandt

    #2
    Re: Time in access

    cflarida@yahoo. com wrote:[color=blue]
    > I have a simple form that will gather it's information from a card
    > reader. The form has 3 fields SSN which is gathered from the card
    > swipe. Can I make access automaticly hit enter when it hits the last
    > digit in this field, it will always be 11 digits (000-00-0000)? I
    > wold also need it to to fill in 2 other fields Date, and Time. I
    > would need the exact Date and time of the swipe or entry. How do I
    > pull from the PC's time to do this. At the moment I have the Date
    > field set for defualt value =date() and the Time field default value
    > set =time() but it populates the date and time that right after the
    > last entry. If anyone has anything that would work please let me
    > know. Thanks[/color]

    Try seeting the AutoTab property to true. That should cause the focus to
    aiutomatically move to the next control when the maximum allowed characters
    is entered.

    DateTimes in Access always include both a Time and a Date so why have two
    separate fields? Just use Now() in a single field and you will get both the
    date and the time. To set this at the moment that the card is swiped use
    the AfterUpdate of that control...

    Me.SwipeTime = Now()

    BTW bad idea to have fields or controls named "Date" and/or "Time" as these
    are reserved words in Access/VBA.


    --
    I don't check the Email account attached
    to this message. Send instead to...
    RBrandt at Hunter dot com


    Comment

    • Ed Robichaud

      #3
      Re: Time in access

      A control's Auto Tab property (set to "Yes") will move the cursor to the
      next control after the last permitted character is entered. A single
      field/control can capture the date and time of the last data entry. In the
      form's Before Update event, put code like:
      Me!myUpDate = Now()

      -Ed

      <cflarida@yahoo .com> wrote in message
      news:1109079553 .467938.108170@ g14g2000cwa.goo glegroups.com.. .[color=blue]
      >I have a simple form that will gather it's information from a card
      > reader. The form has 3 fields SSN which is gathered from the card
      > swipe. Can I make access automaticly hit enter when it hits the last
      > digit in this field, it will always be 11 digits (000-00-0000)? I wold
      > also need it to to fill in 2 other fields Date, and Time. I would need
      > the exact Date and time of the swipe or entry. How do I pull from the
      > PC's time to do this. At the moment I have the Date field set for
      > defualt value =date() and the Time field default value set =time() but
      > it populates the date and time that right after the last entry. If
      > anyone has anything that would work please let me know. Thanks
      >[/color]


      Comment

      • qtip

        #4
        Re: Time in access

        Thank you guys very much I tried the after update before but I put it
        under the Date and time ont the SSN.

        Comment

        Working...