Solved

date time picker and text box

Posted on 2003-12-01
7
2,950 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--
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String manipulation in Visual Basic 7 64
Child Form in front 4 47
Export Data to Different .csv Files 26 105
VBA - If Bookmark = "XXBOOKMARKXX" then 15 29
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

810 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