Tighe -
You can get the minimum [Receive] for a client_ID "NMA" with the following:
Dim minReceive As Date
minReceive = DMin("[Receive]","[TableName]","[Type] = 'NMA' AND [Client_ID]
= " & Me.Client_ID & "'")
You will need to put your source table name in for TableName, and the
correct fieldnames for Receive, Type, and Client_ID if they are different.
Then you would add the days to minReceive instead of Me.Receive.
--
Daryl S
tighe said:
Daryl,
i do have an autonumber[DateNum] and Client_ID in the table, so i should be
able to look for the minimum of that and type="NMA". i wasnt sure how to
reference that on the form, i guess i need to refrence the table since the
form is continuous?
thanks for sticking with my request.
Daryl S said:
Tighe -
How do you know if the record is the 'first' NMA record? If you can tell,
then you can use that criteria in the same way.
--
Daryl S
:
thanks daryl.
do you know how i would only add 60 for the first NMA letter [Recieve]
date/value?
:
Tighe -
The easiest way is to Dim an integer variable and use that. Try this:
Dim AddDays as Integer
If Parent.txtCriteria = "NMA" Then
AddDays = 60
Else
AddDays = 30
End If
DateAdd("d", AddDays, Me.Recieve)
You will need to use the proper control on your parent form where the "NMA"
is - I just made up txtCriteria.
--
Daryl S
:
All,
thank you for all the previouis help.
currently i have a form has three fileds to tracks letter "Recieve",
"ResponseDue", and "Respond."
on the recieve text box's afterupdate event i have:Me.ResponseDue =
DateAdd("d", 30, Me.Recieve).
what i need is that on the first letter, the minimum date, if an the main
form the criteria is "NMA" that the date add be 60.
thank you for the help in advance. AC2007/XP.