?
Solved

date time picker and text box

Posted on 2003-12-01
7
Medium Priority
?
2,968 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Accepted Solution

by:
--laser-- earned 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…
Suggested Courses
Course of the Month12 days, 8 hours left to enroll

777 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