Solved

Making a clock in access

Posted on 2012-03-21
3
249 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

810 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