So basically I have a bunch of text boxes, two of the text boxes gathers dates, and the others gather other info and puts it into a smart key containing keys from the date boxes and other boxes.
The problem is I only want the date from the first date that was inputted. If anyone knows how to do a variable(i used controls to hold the numbers) in expression, that would be perfect
="P" & [rcCarrierName] & "-" & [rcLocationCode] & "-" & [rcDivision] & "-" & [rcProjectName] & "-" & [rcProjectYear] & "-" &
IIF(varQR <> 1,Right([rcQuoteSubmitted],2) & IIf(DatePart("m",[rcQuoteSubmitted])<10,0 & DatePart("m",[rcQuoteSubmitted]),DatePart("m",[rcQuoteSubmitted])) & IIf(DatePart("d",[rcQuoteSubmitted])<10,0 & DatePart("d",[rcQuoteSubmitted]),DatePart("d",[rcQuoteSubmitted])),
IIF(varSA <> 1, Right([rcSiteAwarded) & IIf(DatePart("m",[ rcSiteAwarded])<10,0 & DatePart("m",[ rcSiteAwarded]),DatePart("m",[ rcSiteAwarded])) & IIf(DatePart("d",[ rcSiteAwarded])<10,0 & DatePart("d",[rcQuoteSubmitted]),DatePart("d",[ rcSiteAwarded]))))
Its saying I have the wrong amount of arguments, but can't find the mistake.
Thanks!
[FONT="]
[/FONT]
The problem is I only want the date from the first date that was inputted. If anyone knows how to do a variable(i used controls to hold the numbers) in expression, that would be perfect
="P" & [rcCarrierName] & "-" & [rcLocationCode] & "-" & [rcDivision] & "-" & [rcProjectName] & "-" & [rcProjectYear] & "-" &
IIF(varQR <> 1,Right([rcQuoteSubmitted],2) & IIf(DatePart("m",[rcQuoteSubmitted])<10,0 & DatePart("m",[rcQuoteSubmitted]),DatePart("m",[rcQuoteSubmitted])) & IIf(DatePart("d",[rcQuoteSubmitted])<10,0 & DatePart("d",[rcQuoteSubmitted]),DatePart("d",[rcQuoteSubmitted])),
IIF(varSA <> 1, Right([rcSiteAwarded) & IIf(DatePart("m",[ rcSiteAwarded])<10,0 & DatePart("m",[ rcSiteAwarded]),DatePart("m",[ rcSiteAwarded])) & IIf(DatePart("d",[ rcSiteAwarded])<10,0 & DatePart("d",[rcQuoteSubmitted]),DatePart("d",[ rcSiteAwarded]))))
Its saying I have the wrong amount of arguments, but can't find the mistake.
Thanks!
[FONT="]
[/FONT]
Last edited: