September 21, 200421 yr Currently there is a drop down list with each month range in it. EX: 1/1...2/1 2/1...3/1 And so on. This is used for searching for patients whose baby due date is in that month. HOWEVER, the year stays as the current year when the search is done. What I'm looking at is taking the 1/1...2/1 and adding the appropriate year to it and putting that in the EDD field and doing the search on that. So if it is October and 1/1...2/1 is selected in the drop down list, the date in the EDD box is 1/1/2005...2/1/2005. Any suggestions will be appreciated. Basically I'm not sure how to get the data selected, I think after that I can dynamically create the string to go in the EDD field.
September 21, 200421 yr How about Insert Cacluated Result [EDD, DateToText(Date( LeftWords( range, 1 ), MiddleWords( range, 2, 1), Year(Status(CurrentDate)) + (Month(Status(CurrentDate)) > TextToNum(LeftWords( range, 1 ))) )) & "..." & DateToText(Date( Substitute( MiddleWords( range, 3, 1 ), ".", "" ), MiddleWords( range, 4, 1), Year(Status(CurrentDate)) + (Month(Status(CurrentDate)) > TextToNum(LeftWords( range, 1 ))) ))]?
September 21, 200421 yr Author That is a start for sure. I think I will have to make a new field that has like NEXT YEAR in it then do an IF the current month is greater than the requested month NEXT YEAR is added on other wise use current year.
September 21, 200421 yr That's what the + (Month(Status(CurrentDate)) > TextToNum(LeftWords( range, 1 ))) portion does.
September 21, 200421 yr Author Ahhh. I haven't worked that much with the value lists, so is "range" the selected value?
September 21, 200421 yr Author Gotta work on this. Still doesn't work but I think it is because the way the field is set up and not the calculation.
Create an account or sign in to comment