lol there is a reason why i haven't shown u they query; its confidential data?
even if i did, there is a whole lot of tables and relationships in there that wouldn't make sense, but do not affect the workings of this function or its output;
the only thing you have to know thus far is
a. the function checks in through ADO to a table, finds the date from a specific field, checks a few other criteria and then outputs this date;
b. i placed this date into the query design field, and put it to sorting ascending; as you can see, the data is not sorted, or is sorted haphazardly;
c. in datasheet view, i even tried sorting by the field itself by right clicking the column, and it still shows the same output; this proves that the problem does not lie in the query structure nor the tables (which is yet another reason why i didn't have to show the query). It lies in the code.
The function, uses the ID number to go into a specific table which has all the due dates associated with this ID#. The due dates are stored in a Date/Time field;
The function outputs the lowest date associaed with that ID#;
However, sometimes, there are no due dates associated with the ID#; hence, i cannot output the function as a date variable since it will cause an error (cannot output "" as date, but there are ways around it)
i have a temporary solution which works for the mean time, (dissect the string into three parts, delimiting the "/" and
this outputs an integer which i can then sort by for ascending due dates;
it sorta solves the problem, but i still wanna know why it diesnlt work;