Solved

date time picker and text box

Posted on 2003-12-01
7
2,945 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
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:--laser--
Comment Utility
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--
Comment Utility
could you paste your form declaration here (open the form with notepad and copy + paste)
0
 
LVL 1

Expert Comment

by:anand2k
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 4

Accepted Solution

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


i think this is right
0
 
LVL 41

Author Comment

by:stevenlewis
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now