I wanted to add a clock feature to a form for both Start Time and End Time fields. I followed the instructions from the Help files to make the Start Time work smoothly. The Help files only gave the code for one field, however, and I need two. Following is the OnCurrent Event Procedure for the Start Time field.
All of my controls for the End Time clock feature are exactly the same with a "2" behind them.
The question is: Do I need to add lines of code in the following code to perform the same tasks for the End Time field, or do I copy and paste the exact code and go through and correct the control names to be ending with 2? If the latter, there are a few items in the code I need to know if I should update as well.
1-oCtl (what is this? Do I need to rename it oCtl2 for the End Time control?)
2-fIncrement (don't know what this is, either. Do I rename to fIncrement2?)
3-iChange(again, don't know what it is for. Name it iChange2?)
I assume I can rename the second copy of code to ClockChangeTime2 as well as ClockFlipAMPM to ClockFlipAMPM2, ClockAddLeadingZeros to ClockAddLeadingZeros2, ClockLoadDate to ClockLoadDate2 and ClockSaveDate to ClockSaveDate2????
Also, how do I write this code and save it for future use in other databases? I'm sure I'll use this feature often and as little as I know about VBA I'd like to avoid having to re-do all of this.
Any help is appreciated.
5 2544
BTW, I do not have a Seconds field but did not know which lines of code I could delete. Do I even need to delete andy Seconds code?
What are you trying to accomplish?
What do you mean by adding a clock feature for Start Time and End Time?
What are you trying to accomplish?
What do you mean by adding a clock feature for Start Time and End Time?
If you are talking about an activeX clock where the user selects a time and it is passed to the textbox then you will need a separate instance of the clock for each textbox.
Mary
I did not know there is an ActiveX clock. I do know how to use the ActiveX Calendar control. Is it the same?
The code I referenced is directly from the Access help files for adding a "digital" clock feature to a form for a single text box. I need it for TWO text boxes, a start and stop time for an Employee Time Card database. Since I'm not familiar with VBA, I wasn't sure how to modify the code I downloaded to work for both text boxes.
I wanted to add a clock feature to a form for both Start Time and End Time fields. I followed the instructions from the Help files to make the Start Time work smoothly. The Help files only gave the code for one field, however, and I need two. Following is the OnCurrent Event Procedure for the Start Time field.
All of my controls for the End Time clock feature are exactly the same with a "2" behind them.
The question is: Do I need to add lines of code in the following code to perform the same tasks for the End Time field, or do I copy and paste the exact code and go through and correct the control names to be ending with 2? If the latter, there are a few items in the code I need to know if I should update as well.
1-oCtl (what is this? Do I need to rename it oCtl2 for the End Time control?)
2-fIncrement (don't know what this is, either. Do I rename to fIncrement2?)
3-iChange(again, don't know what it is for. Name it iChange2?)
I assume I can rename the second copy of code to ClockChangeTime2 as well as ClockFlipAMPM to ClockFlipAMPM2, ClockAddLeadingZeros to ClockAddLeadingZeros2, ClockLoadDate to ClockLoadDate2 and ClockSaveDate to ClockSaveDate2????
Also, how do I write this code and save it for future use in other databases? I'm sure I'll use this feature often and as little as I know about VBA I'd like to avoid having to re-do all of this.
Any help is appreciated.
The code you are attempting to reproduce reflects Actual Flight Arrival Times which the User can enter directly into an Arrival Time Text Box, or produce using several 'Spin Button' type effects to enter Hours. Minutes, Seconds, and AM/PM Values. The result of all this interaction is to store the Arrival Time in a Date/Time Field and convert/reflect the proper value for each Current Record being shown. If you also require an End Time Field, you would have to duplicate much of this functionality in order to accomplish this. Unless you are proficient in VB coding, I suggest you use 2 Text Boxes with the appropriate Input Mask and Format Properties set, and bind them to the appropriate Fields as in: - Input Mask: 99:00:00\ >LL;0;_
-
Format : hh:nn:ss AM/PM
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Gino Elloso - Philippines |
last post by:
Hello,
I made a webpage ( @ Geocities Free Webpages ) that contains a
mousetrail clock script. I simply copied the script ( including all
html tags ) exactly as it was from a source webpage (...
|
by: Szabolcs Nagy |
last post by:
I have to measure the time of a while loop, but with time.clock i
always get 0.0s, although python manual sais:
"this is the function to use for benchmarking Python or timing
algorithms"
So i...
|
by: s.shahzaib.ali |
last post by:
I want to make analog clock skin of windows media player so how can i
roteate the layer upto 360 degrees with the help of javascript please
tell me iam very anxious about it. iam the first and only...
|
by: ruca |
last post by:
How can I show a run time clock in my ASP .NET page???? Can anyone have any
code to show that?
I have a javscript file that have all necessary code for that, but I'm using
VB in my ASPX page and I...
|
by: mistral |
last post by:
Here is javscript clock:
http://javascript.internet.com/time-date/mousetrailclock.html
which I want adjust a little:
1. I want replace the days of week/year/date in external circle with
just...
|
by: cenktarhancenk |
last post by:
is there a way to display a ticking clock in a web page using
javascript? but not in a textbox, rather as text that i can change the
style, font etc.
cenk tarhan
|
by: Daz |
last post by:
Hi everyone.
I am trying to find out how I can create a real time clock, which
knows when to set itself backwards or forwards 1 hour. The clock will
work for various timezones. Some of which...
|
by: w33nie |
last post by:
I'd like to put a clock on my web site, that shows the time where I am, not where the user is.
I found a regular clock with google, that shows the time of the user's system clock, so I thought it...
|
by: ANB8503 |
last post by:
Hello, I have created the below script; however, it's not showing in the box like it should... Help please!! I am running out of time to submit this assignment!
Thanks in advance!!
...
|
by: Frinavale |
last post by:
This whole thing started when I wanted to display list items in a circle...it just looked way too much like a clock. So for fun I started to create a JavaScript Analog clock.
I was wondering how...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |