Total number of days

I have a query that has fields called training days1 through 12. They are all 
date fields. The user will enter various dates that will not be contiguous 
dates. Some of the fields may even be left blank. 

I also have a field which is a number field (Byte). I need this field 
automatically updated as to total number of entries (i.e., number of training 
days) as the dates are entered in those 12 fields called training days1 
through 12.

I like to enter the codes in the "Afterupdate" and "onChange" events of 
those 12 date fields. Could someone help me to write those codes?

Thanking you in advance

Leo
0
Utf
12/13/2009 12:21:01 AM
access.queries 6343 articles. 1 followers. Follow

1 Replies
771 Views

Similar Articles

[PageSpeed] 34

You can use the IsNull() function to determine if a field has a value or not. 

I actually find two issues with your table:
1) storing a calculated value in a table
2) using multiple similar fields rather than a normalized table structure.

-- 
Duane Hookom
Microsoft Access MVP


"Leo" wrote:

> I have a query that has fields called training days1 through 12. They are all 
> date fields. The user will enter various dates that will not be contiguous 
> dates. Some of the fields may even be left blank. 
> 
> I also have a field which is a number field (Byte). I need this field 
> automatically updated as to total number of entries (i.e., number of training 
> days) as the dates are entered in those 12 fields called training days1 
> through 12.
> 
> I like to enter the codes in the "Afterupdate" and "onChange" events of 
> those 12 date fields. Could someone help me to write those codes?
> 
> Thanking you in advance
> 
> Leo
0
Utf
12/13/2009 6:56:01 PM
Reply:

Similar Artilces:

1 Keeps appending to Contact Name's Business Fax Number
I'm using Office XP and whenever I build a contact it appends a 1 to the front of it. I have gone through "Dialing Properties" but have been unable to get rid of it. Does anybody have any ideas? -- Paul Bergson Open your Contacts folder Press Ctrl Shift D Select Dialing Options Is the option to add the coutry code selected? -- PATRICK REED [Outlook - MVP]~~~~~~ -Microsoft Certified Professional (MCP) -Have you checked http://www.slipstick.com? -Please post your Outlook version! "Paul Bergson" <pbergson@mnpower.com> wrote in message news:%23BO...

Show actual days
I have two tables : CREATE TABLE [dbo].[FD__PROGRAM_CLIENT]( [ClientKey] [int] NOT NULL, [PgmKey] [int] NULL, [Date_Admit_Program] [datetime] NULL, [Date_Discharged_Program] [datetime] NULL, CONSTRAINT [PK_SYS_FD__PROGRAM_CLIENT] PRIMARY KEY CLUSTERED CREATE TABLE [dbo].[DateLookup]( [DateKey] [int] NOT NULL, [DateFull] [datetime] NULL, [CharacterDate] [varchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [FullYear] [char](4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [QuarterNumber] [tinyint] NULL, [WeekNumber] [tinyint] NULL, [WeekDayName] [varchar](10)...

Grand total in reports
I have a report with 3 grouping like this: owner opportunity Account The report is looking good with each user in separate page and total based on owner. But i need to do grand total for all the owners which will be report total?. I tried to create report with subtotal and changed the grouping but still i didn't get grand total. Any help is appreciated. Thanks, Uma Uma, It sounds like you need a separate total in the report footer to accomplish this. You should be able to just use the sum aggregate function to get this to display I don't think that you need to ch...

1.5%
For a short information, send a blanc mail to: sap36@freeautobot.com ...

Reference number
After adding a sales note to a transaction with a reference number, how do I pull up a list of all the transactions with that reference number? I haven't seen any reports out there (custom reports in customersource) that are based on the transaction table....if you know how to use SO Administrator then a query will work...(replace XXX below with your reference number but keep the single quotes) select transactionnumber, time, referencenumber from [transaction] where referencenumber = 'XXX' order by time Hope this helps... "Michael" wrote: > After adding a sa...

WOW FREE WEBSITE for 7 days
--_NextPart_00009788-00001474-0017CA0B-2025 Content-Type: text/plain Content-Transfer-Encoding: 7bit WOW I just found this site www.leonardjamespromotions.biz about making a BIG DOLLARS with your own site the guy made a BIG DOLLARS in 3 months www.leonardjamomotions.bizesprI just had to learn how he did it --_NextPart_00009788-00001474-0017CA0B-2025-- ...

Convert Number to Word
Is there any Simple method to convert Number into Word (for instance like 1400 to One thousand four hunderd) -- Rup ------------------------------------------------------------------------ Rup's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=37638 View this thread: http://www.excelforum.com/showthread.php?threadid=572539 See http://www.xldynamic.com/source/xld.xlFAQ0004.html -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rup" <Rup.2coc5d_1155801003.7583@excelforum-nospam.com> wrote in message news:...

Another numbering system question
I want to create a numbering system, in a three character format, in a form starting at "001" and so on. Now, because the of the formatting of the prior data from an Excel file, I've had to distinguish one year's records from the next with a text field "08" (year). So when a new record is added, the text "08" is added and then the count begins at "001". How do I do that? table fields are: [I_period] - "08", [row_num] - "001", "002, etc,. Thanks all. -- AusTexRich What is the purpose of this numbering? If is goin...

=?windows-1252?Q?Entering_Purchase_Order_line_items_=96_who=92s_part_?= =?windows-1252?Q?number=3F?=
Any way to select our in-house part number yet have the selected vendor=92s part number be printed on the PO? The choice of either learning every part number from every vendor or using our in-house numbers and possibly getting the wrong part (vendor doesn=92t know our part numbers) is an ugly choice. Using version 8. Is this the way it is in all newer versions? Picking ours and printing theirs would be sweet... G You should be able to do that....right now, our PO prints our item number on the first line and the vendor item number on the second line. If you just want the vendor's it...

Number formatting in chart
The secondary axis in my chart is dollar value. It is showing in thousands, which is what I want, but the data labels I would like it to show 177 only, for example, instead of 177,883. It would be understood that the labels are in thousands. Is this possible? Connie Okay, I guess I didn't make myself very clear. I will try to take a different approach. How do I customize the format of numbers in a column so that it rounds 177,883 to 178? Connie "Connie Martin" wrote: > The secondary axis in my chart is dollar value. It is showing in thousands, > which is ...

Is there a way to SUM based on formatting of a number?
I have a column of $ formatted numbers. Some of them are bold and the others are not. I would like to Sum the column based on whether the bold formatting is applied or not. Is there a way to do this? (doesn't appear to be) If there isn't, then let me explain what I am looking for ultimately. I want to have two totals for this column of $. One that includes everything and one that includes everything that isn't "marked". Bolding a cell is a really easy and visual way of marking a cell. Is there some other way I could mark a cell and is visible and I can conditionall...

Sub Totals as a calculated field in a pivot table
I have a pivot table that pulls revenues product line and displays in monthly columns. Can I create a subtotal that displays quarterly data as a calculated field? In another pivot table I have revenues and costs associated with a variety of projects. Is there a way to subtotal the costs separately from revenues? Thanks for reading. Hi Chesil take a look at the Group functionality within Pivot Tables. You can achieve all that you want with that, without having to resort to calculated fields. Just highlight the items you wish to Aggregate>Right click>Group and gi...

Brainteaser about Days Between Dates
Hello, I use Excel 2000, and I'd like some help with handling dates. I want to calculate the number of days between two dates for all the years from January 1, 2001, to December 31, 2100. The two dates are the day Daylight Savings Time (DST) starts and the day it ends. Two facts: (1) DST always starts on the first Sunday in April and always ends on the last Sunday in October. (2) Although I imagine Excel knows this, every year in the 21st century that's divisible by 4 (2004, 2008 . . . 2096) is a Leap Year (29 days in February instead of 28). Note, however, that the year 2100 i...

MROUND and negative/positive numbers
I have a spreadsheet where I keep track of certain expenses, and The Powers That Be want the dollars rounded to the nearest hundred, which is simple enough using MROUND. But here's where I run into trouble: in a couple of the cells, I could run a surplus or debt in any give quarter, which means the number could be positive or negative. MROUND to the nearest 100 is fine, but it can't round if the number is negative. Is there some way of using MROUND or some other function that would automatically round to the nearest 100 if the number is positive and to the nearest -100 if the number ...

Case number format
Hi: There are a way to change the format of case number (ticketnumber attributes). This is the auto-generated case number. Example: From CAS-01001-R4JCBU to INFO-01001 By the way What the meaning of the letter at the end of the case number (CAS-01001-R4JCBU)? Regards -- Jose Valentin Rodriguez MCP-GP MCBMSS-GP You can change the behavior in the settings section - organization settings - auto numbers ... (sorry I don´t have the system right in front of me - this was from my mind) Best regards "Valentin PR MCP-GP MCBMSS-GP" wrote: > Hi: > There are a way to cha...

Presentations.count in VBA returns false number
Hi, I'm using PowerPoint 2003 with VBA to open a file, copy two slides from it and paste them into another file. Before I start, I check to see if any other files are open in PowerPoint using "Presentations.count". For some reason, it's starting to show that there is a presentation open, but it is not visible. There are no extra instances of PowerPoint.exe in the task manager (I've closed out and restarted). Any ideas why this number would be too large? Call the NewWindow() method to get the presentation to show. So, if you close all presentations and you st...

serial number
does any one have the serial number for visio 2002 enterprise network tools? I would appreciate any help. it's on the case that the cdrom came in (marked do not lose). If you registered the product you should be able to contact MS for it. ...

Convert between numbers and labels
Alright, here's the setup. I have an index list (hereafter referred to as INDEX), which is a table with one column of (unique) numbers, and another column of corresponding labels. I have another table, hereafter referred to as INPUT, with a bunch of numbers. What I want to do is have Access take the INPUT, and create a table (or query, whatever) that will convert these numbers into their corresponding lables from the INDEX. (I also need to be able to convert labels into corresponding numbers, the exact opposite process.) I have already tried using a query, and setting up a relationshi...

Count number of days that fall on a weekend or in a time range?
Hello! I am trying to reconcile my cell phone bill. I have copied and pasted it into Excel 2003. I want to find all entries that fall on Saturday or Sunday, cut/paste that portion into another area of the sheet, then sum the number of minutes used on those days. I also want to find all entries that fall between 9:00PM and 6:00AM in the remainder of the bill and sum those entries. Any suggestions? Thank you for helping! Gregg Hill Hi lets assume the following: - column A: your dates as Excel date format (check this with =ISNUMBER(A1) -> should return TRUE) - column B: the starting ti...

how do i format phone number field
I have imported my Act 2000 database into Outlook 2003 to begin my conversion process. Even though I did not have the 1+ dialing in act..Outlook 2003 it added it to all my phone number fields. How do I bulk format all existing phone number fileds to read only (xxx) 555-1212?? tnbubba <tnbubba@discussions.microsoft.com> wrote: > I have imported my Act 2000 database into Outlook 2003 to begin my > conversion process. Even though I did not have the 1+ dialing in > act..Outlook 2003 it added it to all my phone number fields. How do > I bulk format all existing phone numb...

Monthly Bill Payment Running Totals
Hi, I have excel spreadsheet with this data Verizon Bill Due 12/9/8 $235 Met Ed Bill Due 12/14/8 $345 Dell........... ................... ........ LG........... ................... ........ Pulse........ .................... ......... ** I want this to be calculated automatically ** as I have large list of bills Minimum Amount needed on XXX date 12/1/2008 $0 12/2/2008 $0 12/3/2008 ...

How do I add 1 to a number in column b
I have a spreadsheet in which column b refers to the number of years of safe driving. ie "22 years". How do I add 1 to each cell in column B? If you literally wrote "22 years" into a single cell, the manipulation needed is: =LEFT(B2,FIND(" ",B2)-1)+1&" years" -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "diana" wrote: > I have a spreadsheet in which column b refers to the number of years of safe > driving. ie "22 years". How do I add 1 to each cell in column B? I didn...

Redeemed voucher
I want the voucher number that is being redeemed to be printed in a 40-col receipt along with the details on the balance. I have seen the forum on printing voucher number when being purchased. My current receipt format is using the 'include comment' which display the vocuher number when being purchased. However, when the customer redeems the voucher, the balance is show, but I want the voucher number be printed too. I checked the variables for Tender in the xml, but I have no luck. Please help. Thanks. ...

EFT Payables remit doc number
Client is having an issue where the REMITXXXX number that is assigned during the EFT payment process is not getting pulled correctly. The Number that gets assigned is REMIT000000000000001. This is causing duplicate document number problems. the correct number should be REMIT000000000012735 Any thoughts on how to fix this in GP 9.0? Thanks ...

Cover page number
Using Publisher 2003 I have a 64 page booklet set up using the "booklet" page setup. That makes my cover page a right-hand page. I cannot figure out how to prevent the page number from appearing on the cover. I have inserted a section break between page 1 (the cover) and the two-page layout for pages 2 and 3. Then I selected to not show the page number on the first page of the one-page section. But I am still getting page number 1 printing on the bottom of the cover. Help!! BK wrote: > Using Publisher 2003 > > I have a 64 page booklet set up using the &quo...