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
|
|||
|
|||
Date question
Can anyone help with this function:
=IF[Date Parts Ordered Completed]+ [Date Part Completed]+[Date Purchasing Completed],not blank,=Date The goal is that is all three fields have a date in them, then put in today's date in the final field. If one of the dates is missing, then the final date is blank. The only problem is if I open up that form I do not want it to change the date to today. I want it to stay the date of the actual completion. Any help is greatly appreciated. Thanks, P-Chu -- Message posted via http://www.accessmonster.com |
#2
|
|||
|
|||
Date question
Try this --
Completion_Date: IIF([Date Parts Ordered Completed] Is Null OR [Date Part Completed] Is Null OR [Date Purchasing Completed] Is Null, Null, Date()) -- Build a little, test a little. "P-chu via AccessMonster.com" wrote: Can anyone help with this function: =IF[Date Parts Ordered Completed]+ [Date Part Completed]+[Date Purchasing Completed],not blank,=Date The goal is that is all three fields have a date in them, then put in today's date in the final field. If one of the dates is missing, then the final date is blank. The only problem is if I open up that form I do not want it to change the date to today. I want it to stay the date of the actual completion. Any help is greatly appreciated. Thanks, P-Chu -- Message posted via http://www.accessmonster.com . |
#3
|
|||
|
|||
Date question
Hi P-chu,
Create an After Update event on all three of the fields. In each add the single line: UpdateFinalDate This will call a subroutine named "UpdateFinalDate" that you will add to the form's code module (air code/untested/may need tweaking). Private Sub UpdateFinalDate() If IsNull([Date Parts Ordered Completed]) Or _ IsNull([Date Part Completed]) Or _ IsNull([Date Purchasing Completed]) Then If Not IsNull([Final Date Field]) Then ' Ask user if the existing date should be kept ' or cleared and do as the user indicates End If Else If IsNull([Final Date Field]) Then [Final Date Field] = Date() Else ' Possibly ask the user if the final date should ' updated and do so if the user so indicates End If End If End Sub Hope that helps, Clifford Bass P-chu wrote: Can anyone help with this function: =IF[Date Parts Ordered Completed]+ [Date Part Completed]+[Date Purchasing Completed],not blank,=Date The goal is that is all three fields have a date in them, then put in today's date in the final field. If one of the dates is missing, then the final date is blank. The only problem is if I open up that form I do not want it to change the date to today. I want it to stay the date of the actual completion. Any help is greatly appreciated. Thanks, P-Chu -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201001/1 |
#4
|
|||
|
|||
Date question
Thank you.
KARL DEWEY wrote: Try this -- Completion_Date: IIF([Date Parts Ordered Completed] Is Null OR [Date Part Completed] Is Null OR [Date Purchasing Completed] Is Null, Null, Date()) Can anyone help with this function: [quoted text clipped - 11 lines] Thanks, P-Chu -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201001/1 |
#5
|
|||
|
|||
Date question
This worked as well as Karl's suggestion too. Thank you.
Clifford Bass wrote: Hi P-chu, Create an After Update event on all three of the fields. In each add the single line: UpdateFinalDate This will call a subroutine named "UpdateFinalDate" that you will add to the form's code module (air code/untested/may need tweaking). Private Sub UpdateFinalDate() If IsNull([Date Parts Ordered Completed]) Or _ IsNull([Date Part Completed]) Or _ IsNull([Date Purchasing Completed]) Then If Not IsNull([Final Date Field]) Then ' Ask user if the existing date should be kept ' or cleared and do as the user indicates End If Else If IsNull([Final Date Field]) Then [Final Date Field] = Date() Else ' Possibly ask the user if the final date should ' updated and do so if the user so indicates End If End If End Sub Hope that helps, Clifford Bass Can anyone help with this function: [quoted text clipped - 11 lines] Thanks, P-Chu -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201001/1 |
#6
|
|||
|
|||
Date question
Hi,
You are welcome. Glad to help. Clifford Bass P-chu wrote: This worked as well as Karl's suggestion too. Thank you. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201001/1 |
Thread Tools | |
Display Modes | |
|
|