11-15-2019, 06:48 PM
|
#1
|
Dick S
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
|
Time picker
are their any reliable time pickers available?
|
|
|
11-15-2019, 07:08 PM
|
#2
|
AWF VIP
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
|
Re: Time picker
You don't want this for always picking the current time do you? Or just deviating slightly from the current time? There are/were ActiveX controls for older versions but I would not advise the use of such controls.
__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)
|
|
|
The Following User Says Thank You to Micron For This Useful Post:
|
|
11-15-2019, 07:19 PM
|
#3
|
I’m here to help
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,499
Thanks: 58
Thanked 1,420 Times in 1,401 Posts
|
Re: Time picker
Hi. Check these samples:
Demo1
Demo2
__________________
Just my 2 cents...
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
|
The Following User Says Thank You to theDBguy For This Useful Post:
|
|
11-15-2019, 07:29 PM
|
#4
|
Dick S
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
|
Re: Time picker
Quote:
Originally Posted by Micron
You don't want this for always picking the current time do you? Or just deviating slightly from the current time? There are/were ActiveX controls for older versions but I would not advise the use of such controls.
|
Actually, it's for my wife's medical activities. She liked the one I built for myself for my VA doctors, so I tweaked it a bit to fit her needs. The date goes in as default, as does the time. However, she and I both can not always put our activities in at the moment it happens. I can go in and change the time later than night, but she can’t. She is in a nursing home and probable first stages of Alzheimer’s.
BTW: That's what I found when I googled it. Nothing reliable.
|
|
|
11-15-2019, 07:55 PM
|
#5
|
AWF VIP
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
|
Re: Time picker
Not sure if your answer puts me on the right track, but if you have a date/time field on a form, you could represent the time as (I presume) as 00:00 AM as a normal textbox, or as large as a digital clock, and use a spinner control on either side of those digits to increase or decrease the numbers. Shouldn't be too hard to create.
|
|
|
The Following User Says Thank You to Micron For This Useful Post:
|
|
11-15-2019, 08:33 PM
|
#6
|
Dick S
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
|
Re: Time picker
Thanks so very much for answering. Sounds interesting, but a bit over my expertise (Digital clock in Access, Spinner Control), but very interesting. do you have a link, I would love to study it? I will also google it.
|
|
|
11-15-2019, 08:44 PM
|
#7
|
AWF VIP
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
|
Re: Time picker
Oddly enough, I was searching for one that I was playing with several months ago. I seem to recall that I deleted it, thinking I would never need it and can't find it now. However, it was a bit more complicated I think, as it advanced every second (it was keeping real time and looked like a digital clock) and I don't think that's what you want. If you provide a bit more information I could probably throw something together for you. If that info would be too personal to post here, you can send me a PM if you care to.
|
|
|
The Following User Says Thank You to Micron For This Useful Post:
|
|
11-15-2019, 10:17 PM
|
#8
|
AWF VIP
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
|
Re: Time picker
I threw something together in an hour and 15 minutes. Could have been quicker but clicking on unbound textboxes did some wonky things with the time formats as the textboxes gained/lost focus. Had to find the right combination, syntax and format properties for what I was after.
It's nothing fancy and I might have been able to condense the code, but one never knows how far to go with something like this. It could turn out to be totally useless for you. Anyway, although I'm not a big fan of ActiveX controls in an enterprise situation, I don't suppose it would be any huge deal if down the road this control didn't work in some later version. So here it is
ClockSpin.accdb
__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)
|
|
|
The Following User Says Thank You to Micron For This Useful Post:
|
|
11-16-2019, 01:06 AM
|
#9
|
Registered User
Join Date: Jul 2015
Location: NL - Amsterdam
Posts: 141
Thanks: 58
Thanked 19 Times in 17 Posts
|
Re: Time picker
This article describes how to configure a TextBox properly to enter time values.
https://www.experts-exchange.com/art...ft-Access.html
Not sure if it helps for your specific needs, but interesting anyway
|
|
|
11-16-2019, 04:27 AM
|
#10
|
Dick S
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
|
Re: Time picker
Quote:
Originally Posted by Micron
Oddly enough, I was searching for one that I was playing with several months ago. I seem to recall that I deleted it, thinking I would never need it and can't find it now. However, it was a bit more complicated I think, as it advanced every second (it was keeping real time and looked like a digital clock) and I don't think that's what you want. If you provide a bit more information I could probably throw something together for you. If that info would be too personal to post here, you can send me a PM if you care to.
|
AWF guys are super, thanks for answering, oops sorry and gals.
Nothing personal. All she needs is some an easy way to change the time. I on the other had love learning more Access.
|
|
|
11-16-2019, 07:42 AM
|
#11
|
AWF VIP
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
|
Re: Time picker

Did you see the example I posted?
__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)
|
|
|
11-16-2019, 10:18 AM
|
#12
|
Dick S
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
|
Re: Time picker
Quote:
Originally Posted by Micron

Did you see the example I posted?
|
I hadn't when I posted my last post, but I did just now. It's neat.
How do I get the chosen value into the DB?
|
|
|
11-16-2019, 10:20 AM
|
#13
|
Newly Registered User
Join Date: May 2018
Location: USA baby
Posts: 1,888
Thanks: 38
Thanked 571 Times in 538 Posts
|
Re: Time picker
Quote:
How do I get the chosen value into the DB?
|
Do you want a Popup control or build it on your form? I think Micron was suggesting to build this directly on your form. But you could make a popup.
|
|
|
The Following User Says Thank You to MajP For This Useful Post:
|
|
11-16-2019, 10:35 AM
|
#14
|
Newly Registered User
Join Date: May 2018
Location: USA baby
Posts: 1,888
Thanks: 38
Thanked 571 Times in 538 Posts
|
Re: Time picker
Using Micron's form and a little extra code. Here is a reusable pop up.
You will need a version of this every time you call it
Code:
Private Sub cmdTime_Click()
Dim theTime As String
If IsDate(Me.enterDate) Then
theTime = Format(Me.enterTime, "hh:mm")
Else
theTime = Format(Now, "hh:MM")
End If
DoCmd.OpenForm "TimeControl", , , , , acDialog, theTime
If CurrentProject.AllForms("TimeControl").IsLoaded Then
Me.enterTime = Forms("timeControl").txtTime
DoCmd.Close acForm, "TimeControl"
End If
End Sub
I have built a lot of time controls, but they have always got complicated. Micron's control with hour and minute spinners make it simple and fast.
|
|
|
11-16-2019, 12:14 PM
|
#15
|
AWF VIP
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
|
Re: Time picker
Quote:
How do I get the chosen value into the DB?
|
Bind the control to a field in a record source. Your form is bound to an editable query, so I think all you'd have to do is change the code references to 'enterTime' because that's the name of your table field.
__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)
|
|
|
The Following User Says Thank You to Micron For This Useful Post:
|
|
Thread Tools |
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
All times are GMT -8. The time now is 12:51 PM.
|
|