A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Total number of days



 
 
Thread Tools Display Modes
  #1  
Old December 13th, 2009, 12:21 AM posted to microsoft.public.access.queries
leo
external usenet poster
 
Posts: 236
Default 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
  #2  
Old December 13th, 2009, 06:56 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Total number of days

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.