General information
Category:
Coding, syntax & commands
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only