Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Flag for Zambia asked on

Analog Clock in Ms Access

I have done a digital clock on my switchboard form by using Time() and on timer event plus a re query all is working Okay but I want to turn it into an analog clock , any idea there.

Regards
Microsoft Access

Avatar of undefined
Last Comment
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc

8/22/2022 - Mon
Ryan Chong

Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc

ASKER
Because of viruses I would not want a download , my digital clock is already working, I only need the steps or code to fixed it

Regards

Chris
Norie

Chris

Can you post your code for your digital clock?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc

ASKER
Okay here is my code:

(1) Create clock control  (txtclock)
(2) txtclock  Format property time to (Long)
(3) txtclock data property ( =Time()
(4) On timer make it 1000
(5) On time event

Private sub .......
Me.txtclock.Requery
End Sub

Regards

Chris
Gustav Brock

That code doesn't compile ...

Because of viruses I would not want a download


You really should install an antivirus package.
The first and free step would be to active Windows Defender which works very well.

/gustav
ASKER CERTIFIED SOLUTION
Norie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc

ASKER
For a start you would need code to draw a clock including minute/hour hands, markings for hours etc

Exactly this is what I was looking for, any idea about this same code , example how to create it?

Regards

Chris


[/i]
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc

ASKER
After search on the net I found this code which appear to what Norie is saying :

Create a new form, minimum size 14cm by 14cm.
Anywhere on the form, place 3 lines of any length called scrLineSecond,
scrLineMinute and scrLineHour.

Set the form's TimerInterval to 1000.

In the OnTimer event, past the following:

Private Sub Form_Timer()
Call calcClockHands("Second", Second(Now()))
Call calcClockHands("Minute", Minute(Now()))
Call calcClockHands("Hour", Hour(Now()))

End Sub

I'm only confused by the statement below:

Anywhere on the form, place 3 lines of any length called scrLineSecond,
scrLineMinute and scrLineHour.

Any idea about these lines where do i get them ?

I just want to understand these lines, the rest of coding using X & Y will be done without problems

Regards

Chris
Adam Murray

Simple clock utilizing just VBA (no controls). I was interested with composing a simple clock and the timekeepers accessible through VB all utilized the VB line strategy for drawing. Access is unique! There is a LineSlant property to be set and additionally figuring the begin and end focuses. I put the begin focuses, end focuses and line incline into an exhibit and simply call the directions from the cluster each second. This is as it were the primary go as I need to pass the measurements to the clock for resizing, setting the hues and balances for time zones and so forth and so on.
Norie

Chris

If you open a form in Design View, not Layout View for some reason, you'll find there is a Line control you can add to the form.

Perhaps that's what's being referred to in what you found.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc

ASKER
Okay I have seen it, it is working , for those who may want to use the analogy clock , my advise is to try the Blue Bridge Pty Ltd, Sydney Australia they have done a good code but you have to acknowledge while incorporating it simply google it . However, the digital way seams to be user friendly

Regards

Chris