General information
Category:
Forms & Form designer
>I have a form on which I want certain controls to be visible when the value of a checkbox is false.
>
>In the refresh method, I have the following code:
>
>*refresh
>
>if thisform.chkactive.value = .f.
> thisform.txtin_date.visible = .t.
> thisform.txtin_date.enabled = .f.
> thisform.lblin_date.visible = .t.
>else
> thisform.txtin_date.visible = .f.
> thisform.lblin_date.visible = .f.
>endif
>
>In the CmdNext button, I have the following code:
>
>IF NOT EOF()
> Skip
> thisform.refresh()
>ENDIF
>
>IF EOF()
> =MESSAGEBOX("This is the last " + THISFORM.recordtype, MSGOKONLY + MSGEXCLAMATION, C_APPNAME)
> GOTO BOTTOM
> thisform.Refresh()
>ENDIF
>
>When I move throught the records, the controls become visible one record late. For example, when I get to a record that has a .F. value in the checkbox control, the controls referred to in the refresh method are still not visible. They become visible when I move to the next record. I'm not sure what I'm doing wrong here.
>
Since noone else has responded I'll take a shot. First is it possible that the default refresh must be called and this is why your value is no being updated properly. Maybe adding DODEFAULT prior to the above code will work. I'm guessing here. Hope I'm helping a little.
Previous
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