Information générale
Catégorie:
Codage, syntaxe et commandes
>>> 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
I have a question about the parameters? Is there a buil-in parameter function that I could use to build parameter just by using controlSource of the textbox. Because when I create parameter I usually open up another form and store the parameter in a temperary database, and match the data in temp. database with my existing database using SQL command.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement