Solved

Making a clock in access

Posted on 2012-03-21
3
247 Views
Last Modified: 2012-03-21
I have a clock that I'm working with. I found the code on this website:

http://office.microsoft.com/en-us/access-help/add-clock-control-functionality-to-a-form-in-access-HP001121061.aspx?CTT=5&origin=HA001054662

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.
Copy-of-Inventory-db.accdb
0
Comment
Question by:gigifarrow
  • 2
3 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 37747933
ActualArrivalTime is the name of the textbox to the left of the h/m/s controls in the example.
0
 

Author Comment

by:gigifarrow
ID: 37748641
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.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 37748705
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.
End Sub '  ADD THIS LINE HERE
Public Sub ClockChangeTime(oCtl As TextBox, fIncrement As Boolean)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

My experience with Windows 10 over a one year period and suggestions for smooth operation
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now