Solved

date time picker and text box

Posted on 2003-12-01
7
2,955 Views
Last Modified: 2012-05-04
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
Comment
Question by:stevenlewis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:--laser--
ID: 9855893
i would suggest putting a timer on the form and get it to update the textbox every 100m/s or so
0
 
LVL 4

Expert Comment

by:--laser--
ID: 9855902
could you paste your form declaration here (open the form with notepad and copy + paste)
0
 
LVL 1

Expert Comment

by:anand2k
ID: 9855905
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
Industry Leaders: 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!

 
LVL 4

Accepted Solution

by:
--laser-- earned 250 total points
ID: 9855927
private sub dtptime_change()
    SetTime.text = dtptime.value
End Sub


i think this is right
0
 
LVL 41

Author Comment

by:stevenlewis
ID: 9855935
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
 
LVL 41

Author Comment

by:stevenlewis
ID: 9862913
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
 
LVL 41

Author Comment

by:stevenlewis
ID: 9862974
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question