• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Making a clock in access

I have a clock that I'm working with. I found the code on this website:


It tells you step by step what to do. However, there is one part of the code that I wasn't sure about and it is the following step:

Paste the following line of code into the subroutine in the Visual Basic Editor code window to call the user-defined function ClockLoadDate, which will update the clock controls. Replace ActualArrivalTime with the name of the control that is bound to the underlying date/time field.
ClockLoadDate Nz(ActualArrivalTime, "")

For "ActualArivalTime" Im not sure what underlying date/time field should be which text box do I replace "ActualArivalTime" with.
Below is the form.
  • 2
1 Solution
ActualArrivalTime is the name of the textbox to the left of the h/m/s controls in the example.
gigifarrowAuthor Commented:
My clock is still not working. I keep getting a error,"Can't find End Sub". I look at the bottom and there is  a End Sub.
No - you are looking at the bottom of the module.

Each sub procedure must have its own end sub.
The Form_Current sub does not have an End Sub.  

Private Sub Form_Current()
ClockLoadDate Nz(txHour, "")
'// This routine will change the time part + or - 1.
Public Sub ClockChangeTime(oCtl As TextBox, fIncrement As Boolean)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now