>I created a form using the Form Wizard, with the buttons to navigate and modify records.
>But now I need a TextBox in this form, enabled when the form appears, so that I can navigate to record N.
>The problem is that any TextBox created in the form is not enabled until I click the Edit Record Button (even if the property Enabled is True)!!!! How can I correct this, so that when the form appears the TextBox is allready enabled?
>Thank you very much!
>Araxes
Pedro,
I don't remember the exact place but it was navrefresh or buttonrefresh (more likely navrefresh) code enabling-disabling code. On wizard form dbl click wizard buttons to open code window and from right dropdown select navrefresh. Add code (assuming your textbox name is "myTextbox"):
dodefault()
with thisform.myTextbox
.enabled = !this.editmode
.readonly = this.editmode
endwith
with this
if !isnull(.value) and between(.value, 1, reccount())
go .value
thisform.refresh
endif
endwith
Cetin