John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Thanks Ed....
It would have been quite a while before I thought of using two columns. Worked like a charm....thanks....
>>I am have a bit of difficulty with the following scenario.
>>
>>I have a grid on a form. The displayed numeric values in the grid need to be rounded if the user chosen rounding.
>>
>>I have the control source set to view.field when rounding is off
>>and ROUND(view.field,2) when rounding is on.
>>
>>The problem is that when rounding is on, the value in the grid cannot be changed.
>>
>>I have tried changing the sparse and changing the controlsource on the fly (but this only works when the grid loses focus).
>>
>>Is there a way I can use the view.field as the control source, display the ROUNDED value, and still be able to edit the field?
>
>You may use two grid.column for this trick: one with plain field as controlsource and another with ROUND(...). Normally, the first column is invisible, when second column gets a focus, it makes the first one visible and itself invisible. The first column makes opposite thing in its lostfocus event.
Précédent
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