Hi Steven,
>The next challange is making ecah group of tasks in the departments list a >certain way. I think that it will require another field in the table where >each department group is numbered sequencually.
You're a little vague on what exactly you're trying to do. If you want to order the tasks within the department then that is possible with the table you have. (Unless you want to order them on some value other than TASK)
>But how do I index first on the department no then task no.
INDEX on DeptNo + TaskNo Tag TaskWithinDept
If DeptNo or TaskNo are numeric fields, make sure to convert them in the index expression.
INDEX on ;
Padl(Alltrim(Str(DeptNo)), 5, "0") + ;
Padl(Alltrim(Str(TaskNo)), 5, "0") ;
Tag TaskWithinDept
>Then there is the possibiliy that another task will be inserted.
The index will be updated automatically as each record is inserted.
> Then the tasks for each department group will have to automatically number.
That, I'm afraid, will have to be done programmatically. There are a number of ways to do this. You should be able to find a number of threads on this subject in a search.
HTH
Liam
Liam O'Hagan
MCP VFP Desktop Apps