Why won't DateTimePicker work?

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

    #1

    Why won't DateTimePicker work?

    I'm doing something like this:

    With frmMain
    .DTPicker1.Valu e = rs.Fields("MyDa te").Value
    .Textbox1.Text = "BlahBlah"
    .ShowDialog()
    End With

    When the form appears, it has today's date in DTPicker1 instead of
    what's in the data record. Data field is of type DateTime in SQL2000,
    Date value is in the "Short Date" format.
  • Claes Bergefall

    #2
    Re: Why won't DateTimePicker work?

    Have you turned on option exclicit and option strict?
    Are you sure Value returns a DateTime object? (And what is the *exact* value
    it returns)

    What type is rs btw (I couldn't find anything related to db stuff with a
    Fields property or method)?

    /claes

    "Kevin" <kevinp@cfl.rr. comwrote in message
    news:n6afb219e7 eh9rr4uk1iqg476 qf5obvqrv@4ax.c om...
    I'm doing something like this:
    >
    With frmMain
    .DTPicker1.Valu e = rs.Fields("MyDa te").Value
    .Textbox1.Text = "BlahBlah"
    .ShowDialog()
    End With
    >
    When the form appears, it has today's date in DTPicker1 instead of
    what's in the data record. Data field is of type DateTime in SQL2000,
    Date value is in the "Short Date" format.

    Comment

    Working...