>Hello Fred,
>
>Can you please help me out on this:
>
>I use the following to attach to the where statement these are from and to date fields:
>
>the values in the text box appears like this when i debug:
>thisform.txtfrm.value = {06/01/03}
>thisform.txtto.value = {06/25/03}
>
>In some project sites it works fine with out any problem but for those sites whose project is 5 years old there it is giving problems it is giving errors at clist1 and clist2 in the code.
>
>It says: Function argument value, type, or count is invalid.
>
>is there any other way to handle the between dates where condition Please other than this:
>
>*********************COde********************************
>clist1 = dtoc(thisform.txtfrm.value)
>clist2 = dtoc(thisform.txtto.value)
>
>SET STRICTDATE TO 0
>
>IF NOT EMPTY(cWhereStatement) then
> cWhere = " AND BETWEEN(docdate,{" + clist1 + "}, {" + clist2 + "})"
> cWhereStatement = cWhereStatement + cWhere
>ELSE
> cWhere = " Where BETWEEN(docdate," + clist1 + "," + clist2 + " )"
> cWhereStatement = cWhere
>ENDIF
>**********************END********************************
If the data is from a project that's very old, they might not be using dates at all, but character fields. That's the way that the old SBT accounting package used to store dates until the Y2K problem finally made them change their ways. Are you sure of what format your dates are in the tables used by the SELECT?