You Know You Need A Life When In Your Spare Time...

Mar 14, 2007

...you do this:

There was question asked on the forum a couple weeks ago about setting an event reminder that always triggered at a certain time period. Then I got to thinking about it, because I never use the timer function in Access. So I started experimenting, at first it started out with just triggering a message box. Of course the code would stop until I clicked ok. Then I set it up to run a Beep instead of the message box function. And from there I started wondering if I could get it to play an MP3.

So I used the shell function to call a specific MP3. But you can't call a non-executable - at least I couldn't at first try. I thought since the file type was associated, it would work, but it didn't. So then I called windows media player, but it doesn't autoplay when opened as a stand alone program. So then I called WinAmp, and found that when you put in a specific filename in the shell call it will automatically play that mp3. Then I thought, why not make this thing a full blown alarm clock? Ooooh, bad idea, it always plays the same song, and I certainly don't want to feel like I am in the movie Groundhog Day. Aha! I can call a playlist in winamp. Excellent, and since I have random play turned on in Winamp it plays a different song off the list when it's opened. The next problem was, what do all alarm clocks have? A snooze button. So I built a snooze button into it, and then ran into my next issue:

Winamp runs independently from Access, so closing it could be a real pain if I was to have a snooze button. Oooh, but I could put it in as an activeX control? Well, I couldn't find an easy way to do that but windows media player is easily put in as an active x control. So I did that, and whenever the form it is in gets opened it automatically plays. Rock on. Oh crap, I'm back to the specific song again in the properties of the wmp control. So then I thought hey, it's got properties, I can change them when I call the second form to be opened. I have to build a list, and select a song from it. No, I don't want to do that, that would be a pain, and be too much busy work of inputting all the songs I want to choose from. Ah, but I can take my playlist, save it as a text file, tweak it, and import the filenames to a table in the database. Give each one a unique ID number, generate a random number, open the recordset (i know, I could have used Dlookup, but I never messed with it before) where the unique ID is equal to the random number generated, write the filename to a string, and when I open up the form with the player I set that attribute in code and voila my musical alarm clock. Oh, and when I hit snooze, it regenerates the random number and plays a different song for the next time it goes off.

Wow, how pathetic. What's worse, I keep using the laptop as an alarm clock.

I hate you all for making me learn something. :D

View Replies


ADVERTISEMENT

Blank Fields...PLS SAVE MY LIFE

Jun 15, 2005

I have a query, its been made from 4 table, one is Employee(all employees in my company), and other 3 are from tables Light Vehicles, Heavy Vehicles and MHE. When I run query its shom me all employees. If I put in query Is Not Null or <> in Light Vehicles for expample, its turn me back all records form Light Vehicle, but not all other records. If I dont put Is Not Null or <>"", its show me all employees. What I want is just to show me employees which have at least 1 record for Light, Heavy or Forklift, but not employees which doesnt have anything for Light, Heavy or MHE.

SAVE MY LIFE....

View 2 Replies View Related

General :: Calculating Stock Level For Spare Parts From Transactions

Jun 19, 2012

I am trying to calculate the stock level for my spareparts. I am aware of that I am not to update the stock level in my table but calculate the total from the transactions.

View 9 Replies View Related

Time Format - Short Time Displayed As Medium Time

May 23, 2006

I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.

The link works fine but the time formats are different.

On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format

However on PC 2, opening the same database via the network, the time format is still shorttime but when you read the time within the code it comes out in AM/PM format. Also, when the defaul tiem should be #20:00:00# but this changes to #8:00:00 PM#

Weirdly though, when you just open the table, the times are in the correct shorttime format.

Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?

Any ideas?

This screen shot may help:

View 2 Replies View Related

Time Format - Short Time Displayed As Medium Time

May 23, 2006

I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.

The link works fine but the time formats are different.

On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format

However on PC 2, opening the same database via the network, the time format is still short time but the format is in AM/PM or medium time.

Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?

Any ideas?

View 1 Replies View Related

Reports :: Auto Populate Date And Time Every Time Form Is Updated

Nov 8, 2013

I have a database that stores information for lab testing. Each time a tech does a "step" in the test process he logs it in the table, using an input form. There are different categories, for example preparation, testing, analysis, etc, and each of those steps take time. I have the form autopopulate the date and time with NOW() evertime the form is updated. What i want to do is calculate the time it takes to do each in days. I can easily get how many days it was from now since they logged the test, =NOW()-TestDateTime. What I want to do is get the number of days it took to do each step, ie the number of days between each event. Is there a way to do this?

View 3 Replies View Related

Forms :: Add Time Value To Time Data Type SQL Server Field In Access

May 6, 2015

how to be able to enter time in access form the same way as if would be an access table (1p = 1:00 PM; 1.25 = 1:25 AM etc)

View 1 Replies View Related

Reports :: Attendance Database - Show Time In And Time Out For Specific Date

Apr 3, 2014

I have an attendance database and I connect the time attendance machine db to my access db, what i am trying to do is to generate a report that shows the time in and time out for specific date. the type of attendance db is date/time.

Please see the attached screenshot db from attendance machine.

an also some time there is duplicate entry, I need to get the first and the last entry only for specific date.

View 4 Replies View Related

General :: Formatting Time Conversion - Calculated Elapsed Time

Dec 3, 2013

Formatting issue regarding elapsed time calculated using DateDiff().

I understand that you can specify the output value for DateDiff(). In my case I have chosen "n" for minutes. Each result in my query shows the correct calculation in terms of minutes.

[PunchIn] = 11/23/2013 8:11:28 AM
[PunchOut] = 11/23/2013 5:43:30 PM

[ShiftLength] =DateDiff("n", [PunchIn],[PunchOut]) = 572 minutes.

Now when I try to format the result in terms of H:MM (be it in a form or a report) I get varied results. I'll illustrate an example below:

=Format(([ShiftLength]/60),"0") & "." & Format(([ShiftLength] Mod 60),"00") Returns 10.32 Not correct

=Format(([ShiftLength]60),"0") & "." & Format(([ShiftLength] Mod 60),"00") Returns 9.32 This is correct but I need my result to be in the form of a decimal such as my next example

=([ShiftLength]/60) Returns 9.53333333. Getting there but how do I have this result only show two decimal points 9.53?

View 6 Replies View Related

Forms :: Update Time Portion Of Date / Time Field

Aug 29, 2013

I have a date/time text field on a form with the General Date format and a combo box next to it that has sequencial times as the row source (IE. 12:45 AM, 1:00 AM, 1:15 AM, 1:30 AM, ETC.) When the user chooses a time in the combo box, I want the time portion of the text box to be updated with the chosen time in the combo. I have tried a few things but cant seem to get it right.

View 4 Replies View Related

Prevent Double Booking Using One Date And Start Time With End Time

Apr 10, 2015

so i created a system to have events booked, and i am trying to check time availability of the event room available, but i dont know what wrong. it either my query or vba code. i have attached the attachment,

View 5 Replies View Related

Modules & VBA :: Calculating Elapsed Time Within Time Period

Dec 1, 2013

I have a working dB which can calculate a shift duration and sum total all shifts worked within a period for the purpose of producing a labor report for payroll. I have successfully used the DateDiff function and converted the minutes to HH:MM on my form and reports. Now I want to calculate elapsed time for a specific period within a shift, I'll call it OtherHours and I am aiming to calculate a portion of time that meet the following conditions below. I am using field names of [PunchIn] and [PunchOut] and both are of type General Date.

IF [PunchOut] ISNOT Saturday,Sunday
EXIT FUNCTION
ELSE
IF [PunchOut] ISNOT Between Midnight and 0559 hours
EXIT FUNCTION
ELSE
DATEDIFF ("n", <MIDNIGHT>, [PunchOut])

My thoughts are to solve the DateDiff portion and then figure out how to apply the conditions within the IF statements.

View 4 Replies View Related

Calculating Total Time But Excluding Overlapping Time

Aug 22, 2012

I have a database consisting of two tables. One is "articles" and the other is "tasks". To put it simply, I would like to find how much time the article spends in tasks, but one article can have many tasks, and they often (but not always) overlap. Tasks have a start and end date field.

View 8 Replies View Related

Ignore Time In Date And Time Field

Mar 6, 2007

Hi,

Wonder if someone can help please. I'm quite new to Access so please bear with me.

I have a data field in my database consisting of both a date and time.

I then have a form containing two fields where the user can type a 'To' and 'From' date to extract the records that they are interested in. The query behind this uses the 'Between[Enter The Date] And [Enter The Date]' coding.

The problem is that because the field contains a time it doesn't return any records when I run the query.

Can anyone offer a bit of guidance on how I could ignore the time part of the field perhaps by adapting the above.

Many thanks

Chris

View 2 Replies View Related

Time Management - Simple Time Clock

Jan 9, 2006

Hi all, I havent' been around in a while (toddler, work, getting my BS degree and new baby coming in a week and a half) so I am hopefully not asking a previously posted question.

I'm suspecting my new work isn't accurately paying for the hours worked. I made a quick simple DB where I input my punch times in short time format. There's the typical In, Out for Lunch, In from Lunch, and Out. I've got it correctly adding the times so that it reports the total hours worked per day, though, in order for it to display correctly, that total is in short time as well.

The problem is, when I group a week together, as soon as the sum of the totals reaches 24 or more, it goes back to 0, as it's on the idea that there's only 24 hours in a day.

Hopefully, it's just a formatting issue or is there a function to convert the times (or just the sum) to number of hours?

Thanks and Happy New Year to all.

-Jim

View 2 Replies View Related

Queries :: Employee Time In And Time Out Entry

Jul 18, 2013

I am trying to create an Access database where I can let the employees enter their time-in and time-out, at the end of their shift. I already created this function working, but running into another issue. Everyday, employees need to enter a break. Sometimes they take a break and sometimes they don't, if they work shorter hours. Thus, the break is not a default 30min and has to be enterd by the employee.

Below is the code I have to calculate the total hour:

txtCalcTime has the below code in control source:
=Int([CalcTime]/60) & ":" & Int([CalcTime] Mod 60)

Control source for this form "FrmTimes" property, in which Txtcalctime resides:

QryTimes
"QryTimes" query has the code below:
SELECT TimeID, TimeIn, TimeOut, Brake, DateID, DateDiff("n",[TimeIn],[TimeOut]) AS CalcTime
FROM EmpTimes;

This shows the total number of hours worked. But how can I make it to substract the break time entered by the employee in "txtbreak" on FrmTimes

View 12 Replies View Related

Queries :: Start Time - End Time Query

Nov 3, 2014

I have finger print machine and i already connect to it and get all log.then i tray to get data and here is the code that im using

SELECT Format(CHECKINOUT.CHECKTIME,"dd/mm/yyyy") AS CDate, IIf([CHECKINOUT.CHECKTYPE]=I,Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm")) AS StartTime, Format(CHECKINOUT.CHECKTIME,"hh:nn:ss ampm") AS EndTime, USERINFO.USERID, USERINFO.Name, CHECKINOUT.CHECKTYPE
FROM CHECKINOUT INNER JOIN USERINFO ON CHECKINOUT.USERID=USERINFO.USERID
WHERE (((Format([CHECKINOUT].[CHECKTIME],"dd/mm/yyyy"))='10/04/2014'));

how i get end time due to CHECKTYPE]=O

View 1 Replies View Related

Queries :: Time Calculation Using Current Time?

Oct 9, 2014

I need a Select Query to display data on a form. When an order is appended to my table the field named Printed is updated with the time it was appended. When my form opens it needs to display the field Printed and a field I call MinutesFromPrint. This field needs to display the total minutes elapsed from the time in the Printed field to the current time. My expression is not working.

MinutesFromPrint: DateDiff("n",[Printed],Now())

Here are a couple of samples of my results when I run the query at 7:49 A.M.:

Printed MinutesFromPrint
2:35 60366554
5:07 60366402

View 11 Replies View Related

Sort By Time Only In A Date / Time Field

Mar 19, 2014

I have a column/field named [DateTaken] which contains test dates and times in the same cell. I am needing to find those with a test time less than 2:30 pm or <14:30pm.

data looks like this:

8/22/13 4:23 PM
1/29/14 12:21 PM
1/28/14 3:27 PM
8/26/13 4:27 PM

[code]....

this is what I have come up with to extract the time component of data set so that I can then later, sort it by the time in a query.

JustTime: TimeValue([YourField])
JustTime: ("hh:mm",([DateTaken])) and or ("hh:mm",[DateTaken])

I get either invalid operator or invalid syntax errors trying both of these.

View 5 Replies View Related

Hard Code TIME To Selected Date On Form (to Make It Date&time) For My Query Criteria

Aug 17, 2006

Hello buddies :D, do you have any idea how to make this work?

To select data that falls within this criteria of date range between cboDate and cboDate2 (fields on my form). The date in [tblJobDetails]![timeIn] come in this format "08/17/06 10:24 AM", but the cboDate/cboDate2 (takes in date only e.g 08/17/06) what i am after is to evaluate specific hard coded time in addition to the date entered, i.e. even tho, i haven't entered time on the cboDate/cboDate2, I want specific time hard coded where e.g If i select a date range of 08/17/06 and 08/18/06 on my cboDate and cboDate2 it should really be evaluating: 08/17/06 8:00 AM to 08/18/06 8:00 AM.

This is the criteria i curentlly have on my query in design view tha works perfect in selecting date only.
([tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Or [tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Is Null) And ([tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Or [tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Is Null)
How can I incorporate 8:00am to 8:00am into my cboDate and cboDate2. What can i do to make this happen? Your kindness will be greatly appreciated http://www.naijaryders.com/forums/images/smilies/thankyou.gif

View 10 Replies View Related

UTC (GMT) Time To Local Time In Query. Please Help

Jun 7, 2006

I have a link table with a field in GMT time. I want to convert the times to local time in a query. I know that I should use DateAdd, but I am just wondering how to know summer and winter time. On the summer our local time is +2 GMT and on winter +1.

View 14 Replies View Related

Forms :: Time In / Time Out Attendance

Apr 10, 2014

Any sample database where its about Time In and Time Out Attendance. It will just calculate the difference of Time In Time Out with employees Card Number.

The Time In and Time Out attendance is provided (no data entry), it is generated from other tool. I will just load it from an excel sheet to the access database and it will calculate and generate report. Default should be 9 hours per day, if they wont render 9 hours it will show in Difference column. Form will be like this:

ID Num: | Name: | Time In: | Time Out: | Total |Difference (missing hours)

12345 | Al Smith | 8.00am | 5:00pm | 9 | 0
54321 | Joy Pitt | 8.00am | 4.30pm | 8.30 | -0.30

View 4 Replies View Related

Adding And Subtracting Short Time Values Together/changing Short Time Into Minutes

Dec 9, 2004

Hello again,

I think my subject heading explains it. How would you add or subtract two short time formatted values and produce a short time value? Also, how would you change a short time value into number minutes. (i.e. 5:30 into 330) Thanks!

G

View 1 Replies View Related

Time In Access: Keeping "medium Time" Format

Mar 25, 2008

I've run into a bug, I think. I have a time field with it set to show "Medium Time" which is "hh:mm(AM/PM)", however, when I combine the information with another field in a query (=[OfficeDay]&" - "&[POfficeTime]), the time comes out as "Long Time" or "hh:mm:ss(AM/PM)". End result is Wednesday - 10:30:00AM when it should be Wednesday - 10:30AMDoes anyone know a way around this?

View 1 Replies View Related

Queries :: Getting Date / Time Range - Date And Time Are Separate Fields

Mar 13, 2014

I have a database with date and time each stored in a separate field. Now I want to query the database based on a start date/time and an end date/time. I started with the code below but it only returns events within the same time range on each day when what I really need is every event from a specified date and time through a specified date and time.

SELECT myTable.ID AS myTable_ID, myDate, myTime, FirstName, LastName
FROM Staff INNER JOIN myTable ON
Staff.ID = myTable.StaffID
WHERE myTable.myDate >= #3/2/2014#
AND myTable.myDate <= #3/3/2014#
AND myTable.myTime >= #8:00PM#
AND myTable.myTime <= #11:00PM#
ORDER BY myDate desc

In the above example what I want is every event from 3/2/2014 8:00PM until 3/3/2014 11:00PM. But what I get instead is every event between 8:00PM and 11:00PM on 3/2/2014 and every event between 8:00PM and 11:00PM on 3/3/2014.

View 4 Replies View Related

SQL To Get A Job Start Time And End Time??

Oct 21, 2006

Hi,

I have a database that tracks jobs as they are being completed.

I have 2 tables, the first of which contains details of the jobs and the second contains details of the individual tasks that make up each job (Job and Task respectively)

Within the Job table, there are several fields, however the fields I am concerned with are JobKey, JobID, Start_Time and End_Time.

Currently, as each task within a job is completed, a new entry is added to the Job table with an updated End_Time. At the end of a job, there will be several entries in the Job table similar to

JobKey JobID Start_Time End_Time
1 1 10:00:02 11:00:07
2 1 10:00:02 11:01:14
3 2 10:02:12 11:24:45
4 1 10:00:02 11:02:34
5 1 10:00:02 11:05:25

etc

When I query the Job table, I end up with multiple references to the same job, where all I really want is a single reference to a job with the JobID, Start_Time and the End_Time the last entry relating to a particular job.

How would I write a query to give me a single reference to a JobID Start_Time and the final entry for End_Time?

eg From the above, my query should return

JobID Start_Time End_Time
1 10:00:02 11:05:25
2 10:02:12 11:24:45

Thanks for any help with this

W1dge

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved