Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,228 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,318 people online right now. Registration is fast and FREE... Join Now!




DTpicker isssue with Time

 
Reply to this topicStart new topic

DTpicker isssue with Time, dtpicker value issue

rudeman76
13 Oct, 2008 - 04:48 AM
Post #1

New D.I.C Head
*

Joined: 29 Jul, 2008
Posts: 8

I have just started using dtpicker. I have a form that the user enters in the events throughout the day. I use dtpicker for the user to enter in the time. I have format set to: 2 - dtptime. When the form loads i set the time to the current time. My problem is when the user changes the time, it still takes the current time. It wont take the new time entered. I dont know enough about dtpicker to figure it out. I have searched but cant come up with anything. i have been using dtpicker.value to retrieve the time.

Andrew
User is offlineProfile CardPM
+Quote Post

jaakko
RE: DTpicker Isssue With Time
13 Oct, 2008 - 01:46 PM
Post #2

New D.I.C Head
*

Joined: 26 Sep, 2008
Posts: 21



Thanked: 1 times
My Contributions
QUOTE(rudeman76 @ 13 Oct, 2008 - 05:48 AM) *

I have just started using dtpicker. I have a form that the user enters in the events throughout the day. I use dtpicker for the user to enter in the time. I have format set to: 2 - dtptime. When the form loads i set the time to the current time. My problem is when the user changes the time, it still takes the current time. It wont take the new time entered. I dont know enough about dtpicker to figure it out. I have searched but cant come up with anything. i have been using dtpicker.value to retrieve the time.

Andrew



You should show your code to be helped.
User is offlineProfile CardPM
+Quote Post

rudeman76
RE: DTpicker Isssue With Time
13 Oct, 2008 - 02:43 PM
Post #3

New D.I.C Head
*

Joined: 29 Jul, 2008
Posts: 8

QUOTE(jaakko @ 13 Oct, 2008 - 02:46 PM) *

QUOTE(rudeman76 @ 13 Oct, 2008 - 05:48 AM) *

I have just started using dtpicker. I have a form that the user enters in the events throughout the day. I use dtpicker for the user to enter in the time. I have format set to: 2 - dtptime. When the form loads i set the time to the current time. My problem is when the user changes the time, it still takes the current time. It wont take the new time entered. I dont know enough about dtpicker to figure it out. I have searched but cant come up with anything. i have been using dtpicker.value to retrieve the time.

Andrew



You should show your code to be helped.


i only hava little bit of code for it. I do most of it in the properties.

CODE

    txtTime.MinDate = "00:00"
    txtTime.MaxDate = "23:59"
    txtTime.Value = Format(Time, "Short Time")

this is as form load. I just added the 1st 2 lines to try it.

CODE

strtime = txtTime.Value


this is after the user enters in a time and comment and presses an ok button. From here it enters it into an access table.

User is offlineProfile CardPM
+Quote Post

thava
RE: DTpicker Isssue With Time
13 Oct, 2008 - 05:03 PM
Post #4

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 442



Thanked: 18 times
Dream Kudos: 50
My Contributions
Even though you set a value to time it takes a date also

so when you store the time in the database better store with date or else

format the datetime to time and store
and when you retrive the data similarly retrive the data with the same format

for example

strtime = format(txtTime.Value,"HH:mm:ss")

like

txttime.value = format(strtime,"HH:mm:ss")

hope this helps
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:08AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month