>> But my problem is that the leader off the production line want to look at
>> how many hours employee have between
>> to dates.
>> If at the same time the leader off the technical staff want to look at the
>> employee he is responsible for.
>> 5 sec after lead off prod.line push calc button lead. off tech push calc
>> button,
>> the end result will be between the to dates which the last leader
>> calculated.
>
>This sounds like you're writing the results of these calculations back
>to .DBF files. For ad-hoc queries, this is not recommended, precisely
>because of the problems that you're having.
>
>Check out the TO CURSOR clause of the SELECT command.
>
>/Paul
Per, Paul has a good point about ad-hoc queries using CURSORs instead of TABLEs to store data. Remember that a cursor can be used for a printed report, so a line-leader could get a report for 1 day while a plant leader was running the same report for a week or a month from the identical set of raw data. Pass the beginning and ending dates to the SQL as parameters. The user enters them into text boxes which aren't bound to data, and the SQL picks them up. If you need to store the data for the entire week, do these calculations AFTER the whole week's data is entered. This would be a separate SQL, used for ONLY this calculation.
HTH
Barbara