Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making Fields Read only
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Making Fields Read only
Miscellaneous
Thread ID:
00634031
Message ID:
00634031
Views:
41
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
Map
View

Click here to load this message in the networking platform