HI,
i have two select fields. lets call select field one class, the other student. Class is not linked to any column in the database. I just created it.
select field two is called students and is of type integer (this integer is of course a foreign key).
what i want:
originally when the form loads, select field students gets loaded with all students IDs vial a lookup SELECT statement.
When i chose a class in select field class, i want to return all studentIDs that belong to that class.
I have tried this & it doesnt work:
sc_select(my_data, “select StudentsID from classprogress WHERE ClassID = {Class}”);
if ({my_data} === false)
{
echo “Access error. Message =”. {my_data_erro};
}
else
{
while (!$my_data->EOF)
{
{Student} = $my_data->fields[0];
$my_data->MoveNext();
}
$my_data->Close();
}
note above that student is a select field, its new data should be only studentIDs that belong to that particular class!
it seems to return all results and does not remove the original contents of the select field student.
i would be greatful for any hints