Hiding and Showing A Field

Hello,

I have come across some code on a form which OnOpen does this

CurrForm.EDITABLE := FALSE;

Then on selecting a function button option does this

CurrForm.VPPG.EDITABLE(NOT(CurrForm.VPPG.EDITABLE));

The problem is that the function button to make a single field editable doesn’t work and the field remains greyed out. Please could anyone advise as to the best way to resolve.

Regards

Andrew

Hi Andrew,

Isn’t this the same exact question you were asking on this post : http://dynamicsuser.net/forums/t/79559.aspx ? (It’s usually preferred that you make another comment on the original post, rather than making multiple posts for the same question. It avoids splintered threads, and makes it easier to avoid duplicate replies)

And in that post, I had asked you to check the Enabled property of the control you were asking about. What did you find when you checked the Enabled property setting?

Sorry George, The enabled property was editable true.

Thanks :slight_smile:

Andrew,

You said “The enabled property was editable true.” Just want to confirm that you looked at the Editable property, and the Enabled property, and both are TRUE? If that’s the case, the only other place that comes to mind to check would be the Focusable property for that control. If all of those are TRUE, then you might take a look at the rest of the code in the form to see whether anything might be setting the value of those properties at runtime.

Another possibility might be that the underlying source field for the control might be defined as being read-only at the table level. That wouldn’t explain the greyed-out appearance of the control on the form at runtime, but it’s something to consider nonetheless.

Hope that helps.

try currform.update.