Date and Time

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Z

    Date and Time

    I have code that I've used before to automatically insert the current date
    and time into text boxes when a user clicks in the box, like this:

    Private Sub txtDate_GotFocu s()
    txtDate = Date
    End Sub
    Private Sub txtTime_GotFocu s()
    txtTime = Time
    End Sub

    When I try to use this code in a form that is a derivative of the Visual
    Data Manager get error message "Procedure declaration does not match
    description of event or procedure having the same name". When I get the
    property of the event directly from the combo box, it becomes GotFocus(Index
    As Integer), but I keep getting Invalid Use of Property errors.
    I see four properties for the event (Count, Item, Lbound, Ubound), should I
    be using one of these?




  • J French

    #2
    Re: Date and Time

    On Wed, 01 Dec 2004 03:16:07 GMT, "Steve Z" <stevez6996@hot mail.com>
    wrote:
    [color=blue]
    >I have code that I've used before to automatically insert the current date
    >and time into text boxes when a user clicks in the box, like this:
    >
    >Private Sub txtDate_GotFocu s()
    >txtDate = Date
    >End Sub
    >Private Sub txtTime_GotFocu s()
    >txtTime = Time
    >End Sub
    >
    >When I try to use this code in a form that is a derivative of the Visual
    >Data Manager get error message "Procedure declaration does not match
    >description of event or procedure having the same name". When I get the
    >property of the event directly from the combo box, it becomes GotFocus(Index
    >As Integer), but I keep getting Invalid Use of Property errors.
    >I see four properties for the event (Count, Item, Lbound, Ubound), should I
    >be using one of these?[/color]

    You have made one or more of your Textboxes into a Control Array
    - in other words you have put something in the Index property

    Comment

    • Steve Z

      #3
      Re: Date and Time


      "J French" <erewhon@nowher e.uk> wrote in message
      news:41ad8ba1.8 9126874@news.bt click.com...[color=blue]
      > On Wed, 01 Dec 2004 03:16:07 GMT, "Steve Z" <stevez6996@hot mail.com>
      > wrote:
      >[color=green]
      > >I have code that I've used before to automatically insert the current[/color][/color]
      date[color=blue][color=green]
      > >and time into text boxes when a user clicks in the box, like this:
      > >
      > >Private Sub txtDate_GotFocu s()
      > >txtDate = Date
      > >End Sub
      > >Private Sub txtTime_GotFocu s()
      > >txtTime = Time
      > >End Sub
      > >
      > >When I try to use this code in a form that is a derivative of the Visual
      > >Data Manager get error message "Procedure declaration does not match
      > >description of event or procedure having the same name". When I get the
      > >property of the event directly from the combo box, it becomes[/color][/color]
      GotFocus(Index[color=blue][color=green]
      > >As Integer), but I keep getting Invalid Use of Property errors.
      > >I see four properties for the event (Count, Item, Lbound, Ubound), should[/color][/color]
      I[color=blue][color=green]
      > >be using one of these?[/color]
      >
      > You have made one or more of your Textboxes into a Control Array
      > - in other words you have put something in the Index property[/color]

      You are correct, thanks for the excellent analysis.
      Though I didn't technically do it, the Visual Data Manager did it. Looks
      like I'll have to start over and ignore the Manager like I used to.


      Comment

      Working...