Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-15-2019, 06:48 PM   #1
Dick7Access
Dick S
 
Dick7Access's Avatar
 
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
Dick7Access is on a distinguished road
Time picker

are their any reliable time pickers available?

Dick7Access is offline   Reply With Quote
Old 11-15-2019, 07:08 PM   #2
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
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)
Micron is offline   Reply With Quote
The Following User Says Thank You to Micron For This Useful Post:
Dick7Access (11-15-2019)
Old 11-15-2019, 07:19 PM   #3
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,499
Thanks: 58
Thanked 1,420 Times in 1,401 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
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.
theDBguy is online now   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
Dick7Access (11-15-2019)
Old 11-15-2019, 07:29 PM   #4
Dick7Access
Dick S
 
Dick7Access's Avatar
 
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
Dick7Access is on a distinguished road
Re: Time picker

Quote:
Originally Posted by Micron View Post
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.
Dick7Access is offline   Reply With Quote
Old 11-15-2019, 07:55 PM   #5
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
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.
Micron is offline   Reply With Quote
The Following User Says Thank You to Micron For This Useful Post:
Dick7Access (11-15-2019)
Old 11-15-2019, 08:33 PM   #6
Dick7Access
Dick S
 
Dick7Access's Avatar
 
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
Dick7Access is on a distinguished road
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.
Dick7Access is offline   Reply With Quote
Old 11-15-2019, 08:44 PM   #7
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
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.

Micron is offline   Reply With Quote
The Following User Says Thank You to Micron For This Useful Post:
Dick7Access (11-16-2019)
Old 11-15-2019, 10:17 PM   #8
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
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)
Micron is offline   Reply With Quote
The Following User Says Thank You to Micron For This Useful Post:
MajP (11-16-2019)
Old 11-16-2019, 01:06 AM   #9
MrHans
Registered User
 
Join Date: Jul 2015
Location: NL - Amsterdam
Posts: 141
Thanks: 58
Thanked 19 Times in 17 Posts
MrHans is on a distinguished road
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
MrHans is offline   Reply With Quote
Old 11-16-2019, 04:27 AM   #10
Dick7Access
Dick S
 
Dick7Access's Avatar
 
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
Dick7Access is on a distinguished road
Re: Time picker

Quote:
Originally Posted by Micron View Post
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.
Attached Files
File Type: zip DicksVitals Ver1.3.zip (133.6 KB, 10 views)
Dick7Access is offline   Reply With Quote
Old 11-16-2019, 07:42 AM   #11
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
Re: Time picker


Did you see the example I posted?
__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)
Micron is offline   Reply With Quote
Old 11-16-2019, 10:18 AM   #12
Dick7Access
Dick S
 
Dick7Access's Avatar
 
Join Date: Jun 2009
Location: Belleview, FL
Posts: 3,497
Thanks: 608
Thanked 41 Times in 39 Posts
Dick7Access is on a distinguished road
Re: Time picker

Quote:
Originally Posted by Micron View Post

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?
Dick7Access is offline   Reply With Quote
Old 11-16-2019, 10:20 AM   #13
MajP
Newly Registered User
 
Join Date: May 2018
Location: USA baby
Posts: 1,888
Thanks: 38
Thanked 571 Times in 538 Posts
MajP has a spectacular aura about MajP has a spectacular aura about
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.
MajP is offline   Reply With Quote
The Following User Says Thank You to MajP For This Useful Post:
Dick7Access (11-16-2019)
Old 11-16-2019, 10:35 AM   #14
MajP
Newly Registered User
 
Join Date: May 2018
Location: USA baby
Posts: 1,888
Thanks: 38
Thanked 571 Times in 538 Posts
MajP has a spectacular aura about MajP has a spectacular aura about
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.
Attached Files
File Type: accdb DicksVitals Ver1.4.accdb (1.88 MB, 9 views)
MajP is offline   Reply With Quote
Old 11-16-2019, 12:14 PM   #15
Micron
AWF VIP
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 1,223
Thanks: 10
Thanked 229 Times in 217 Posts
Micron has a spectacular aura about Micron has a spectacular aura about
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)
Micron is offline   Reply With Quote
The Following User Says Thank You to Micron For This Useful Post:
Dick7Access (11-16-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with time picker Nokia N93 General 8 01-16-2018 09:23 PM
Time Picker Bilal Forms 6 04-13-2016 09:20 AM
Time Picker sahil Forms 15 04-27-2008 02:48 PM
Help with my Time Picker Chimp8471 Forms 2 03-08-2004 02:58 PM
date time picker cocobil Forms 3 05-05-2001 11:58 AM




All times are GMT -8. The time now is 12:51 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World