Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Making Fields Read only
Hi.
I have a form with 3 pages, Page 1 = Grid and various fields in pages 2 and 3
I am trying to conditionally prevent access to fields if the grid record is set to Posted. In other words, If the record has been posted, dont allow any fields to be amended, else allow fields to be amended.
I have set up a loop to set the fields to read only e.g.
For LnFor = 1 to ThisForm.pgfPageFrame1.page2.ControlCount
If Pemstatus(ThisForm.pgfPageFrame1.page2.Controls(lnFor),"Readonly", 5)
ThisForm.pgfPageFrame1.page2.Controls(lnFor).Readonly = .T.
Endif
Endfor
This works up to a point:
1) Combo boxes are not flagged as read only
2) When I hit a record that has NOT been posted, I will probably have to run through a loop to flag all fields as readable again (except that I have some fields that will always be read only)
I'm just wondering is there another/better way of doing this ?
Regards,
Gerard
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