473,659 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help Please!!

HI all!!

Does anybody knows a function that will allow me to do the following
in a form:

StartTime StopTime TotalHours NO LUNCH(this is a Check Box)
8:00 03:00pm 07:00

The Problem is that if the employee check "NO LUNCH"; 30 minutes has
to be add it to Total Hours. In this case, if the employee check "NO
LUNCH" total hours will be 07:30. It seems very simple, but I don't
have any experience in Access2000. Also, If there is any function,
does the function will go into the click event or Afterupdate event???
Here is the Data/type of those fields?
startTime= Date/time
StopTime= Date/time
TotalHours= text
NOLUNCH= Yes/NO

Thanks in advanced.
Nov 12 '05 #1
3 1641
On 13 Apr 2004 06:40:20 -0700, christian wrote:
HI all!!

Does anybody knows a function that will allow me to do the following
in a form:

StartTime StopTime TotalHours NO LUNCH(this is a Check Box)
8:00 03:00pm 07:00

The Problem is that if the employee check "NO LUNCH"; 30 minutes has
to be add it to Total Hours. In this case, if the employee check "NO
LUNCH" total hours will be 07:30. It seems very simple, but I don't
have any experience in Access2000. Also, If there is any function,
does the function will go into the click event or Afterupdate event???

Here is the Data/type of those fields?
startTime= Date/time
StopTime= Date/time
TotalHours= text
NOLUNCH= Yes/NO

Thanks in advanced.


In a query:
TotalHours:
DateDiff("n",[StartTime],DateAdd("n",Ab s([Check])*30,[EndTime]))/60

In an unbound control's Control Source:
=DateDiff("n",[StartTime],DateAdd("n",Ab s([Check])*30,[EndTime]))/60

Because a Yes/No field value is either -1 or 0, you can add either 0
or 30 minutes to the EndTime and divide by 60 minutes to get the
result in hours. The ABS() function makes the number a positive value.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #2
Thanks Fred for your reply. The function works, but it alters the
functionality of the other fields.I get this in my totalHours field
#NAME?

Do you have any other suggestions??

Thanks,once again.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
cristian sepulveda wrote:
Thanks Fred for your reply. The function works, but it alters the
functionality of the other fields.I get this in my totalHours field
#NAME?

Do you have any other suggestions??

Thanks,once again.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Change his Check to NoLunch.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3487
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql, because the dates must have quotes on each side. I just don't know how make the dates right. Well I'll just show you the code and some insert statements it generates. Could anyone please help me?
1
406
by: LilleSkutt | last post by:
I am trying to create and instantiate a class into a created domain, so that I can unload the domain and replace the class (assembly .dll) while the main application is running, but I can't get it to work for some reason. Here is the code: ' Create an appdomain Try Dim setup As AppDomainSetup = New AppDomainSetup setup.ApplicationBase = "C:\test" setup.PrivateBinPath = AppDomain.CurrentDomain.BaseDirectory setup.ApplicationName =...
14
2142
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left Frame (File LeftEx8_2.html) a series of buttons, which when clicked prompt the user to enter information for background color, text color, link color, title and some text.
3
3416
by: radioman | last post by:
Hi all, I would appreciate some help please. I just need pointing in the right direction as I am at a loss. Basically I have a form (frmAddMaster) which displays two subforms "Master Stock subform" and "Client Stock Template subform". Each subform contains the following fields "Product ID,Product Description and Size". What I am trying to do is to select rows from the "Master Stock subform" and copy them to "Client Stock Template...
23
3260
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
1
3436
by: Chua Wen Ching | last post by:
Hi there, I have some problems when reading XML file. 1. First this, is what i did, cause i can't seem to read "sub elements or tags" values, so i place those values into attributes like this. Before: ----------
4
2267
by: steroche | last post by:
I would REALLY appreciate help please please please! Im sure it is probably blindingly obvious to most of you but I am totally in the dark here!I am lost - i thought i had finally figured out this dataSet updating lark when i realised that i think i am right back at square 1!!! Here's my scenario - i have a SQLDB and i retrieve all my data from that into a dataset and display this to a datagrid(WebForm). I have got this grid sorted and...
28
10257
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when appropriate based on your method names . the GridView has OnRowCommand="GridView1_RowCommand" in the aspx. my problem is that the RowCommand event is firing twice (95% of the time) on the page. the other 5% it only fires once. there's no
2
2585
by: Richard | last post by:
Help please. I am trying to autofill a form text field from a select-box lookup. I have no problem doing this if the select-box is part of the form but because there are 5 possible select boxes for them to choose from and because of the very large number of options in each select box, to save form loading time, I want to put the look-up select boxes on separate (pop-up) pages. (I prefer them not to be hidden divs on the same page) ...
0
2735
by: uno7031 | last post by:
Help Please!!! Adding 5 Days to another Date in an access query Good Morning, Help please…. I am new to access and trying to write a query that will add 5 days between a RecDate and a DLPayDate I created the query in design view of access. Current Query: SELECT PaymentCalculator2.ID, PaymentCalculator2.RecDate, DateAdd("w",5+1,) AS DLPayDate, DateAdd("w",5,) AS DLPayDate2 FROM PaymentCalculator2 WHERE...
0
8332
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.