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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|