[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2981
  • Last Modified:

date time picker and text box

I have a date time picker and a text box setTime.txt. the dt picker is set to dtptime. I want the setTime.txt to update when the user changes the time in the dtpicker. Any suggestions?
0
stevenlewis
Asked:
stevenlewis
  • 3
  • 3
1 Solution
 
--laser--Commented:
i would suggest putting a timer on the form and get it to update the textbox every 100m/s or so
0
 
--laser--Commented:
could you paste your form declaration here (open the form with notepad and copy + paste)
0
 
anand2kCommented:
hi,

u can use Change event of date time picker to set the value of textbox

Private Sub dtpKeyLog_Change()
   myTxtBox.text=dtpKeyLog.value
End Sub

bye
Anand
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
--laser--Commented:
private sub dtptime_change()
    SetTime.text = dtptime.value
End Sub


i think this is right
0
 
stevenlewisAuthor Commented:
It's late here now (12:43 am) and I have to get up at 5:00 am, so I'll try these tomorrow nite and let you know
0
 
stevenlewisAuthor Commented:
OK, no luck
tried
Private Sub dtPicker1KeyLog_Change()

   setTime.Txt.Text = DTPicker1KeyLog.Value
End Sub
and
Private Sub dtPicker1KeyLog_Change()

   setTime.Txt.Text = DTPicker1.Value
End Sub
no errors, but didn't update the text

tried
Private Sub dtPicker1_Change()


   setTime.Txt.Text = DTPicker1.Value
End Sub
thru up a flag, "method or data member not found"

and
Private Sub dtPicker1time_Change()


   setTime.Txt.Text = DTPicker1time.Value
End Sub
ne errors, but no change

ther date picker is named
dtPicker1
so this one
Private Sub dtPicker1_Change()


   setTime.Txt.Text = DTPicker1.Value
End Sub
is the closest, but it doesn't seem to support the change property?
and I really don't want to add another timer
0
 
stevenlewisAuthor Commented:
Oooops, my bad, had an extra "."
this one works
rivate Sub dtPicker1_Change()

   setTime.Text = DTPicker1.Value
End Sub
So, we have a winner!
Thanks again for your help!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now