I was hoping to stay away from changing the RecordSource of the grid, as I have seen in rare situations (slower systems), the grid losses it's custom settings (Header captions). I think (after 3 days now) I found a work around. I added one line of code and a comment, in the ActivatePage.
PROCEDURE ActivatePage
LPARAMETERS lcPageType
IF TYPE('lcPageType') <> 'C'
RETURN
ENDIF
LOCAL lnPageNumber
DO CASE
CASE lcPageType = 'A'
lnPageNumber = 1
CASE lcPageType = 'G'
lnPageNumber = 2
OTHERWISE
RETURN
ENDCASE
ThisForm.pgf_COA.Page1.text1.setfocus()
ThisForm.SetupPage(lnPageNumber)
ThisForm.pgf_COA.ActivePage = lnPageNumber
ThisForm.pgf_CoA.Pages(lnPageNumber).Refresh()
ENDPROC
>Yes you are right. When I set safety off, the button depressed position is not visible at all. To get the grid to refresh correctly, I had to modify the code as follows:
>
>
> PROCEDURE ActivatePage
> LPARAMETERS lcPageType
> IF TYPE('lcPageType') <> 'C'
> RETURN
> ENDIF
> LOCAL lnPageNumber
> DO CASE
> CASE lcPageType = 'A'
> *- Account
> lnPageNumber = 1
> CASE lcPageType = 'G'
> *- Group
> PRIVATE lnrecno
> lnrecno=RECNO('Acct_Disp')
> lnPageNumber = 2
> THISFORM.pgf_coa.page2.grd_acct.recordsource=""
> THISFORM.pgf_coa.page2.grd_acct.recordsource="Acct_Disp"
> GOTO lnrecno
> OTHERWISE
> RETURN
> ENDCASE
> ThisForm.SetupPage(lnPageNumber)
> ThisForm.pgf_COA.ActivePage = lnPageNumber
> ThisForm.pgf_CoA.Pages(lnPageNumber).Refresh()
> ENDPROC
>
>
>However, I haven't been able to get the button to appear depressed when clicked on yet...
>
>
>>Thanks for looking at this Tracy.
>>If you are getting the confirmation to ZAP, you will not see the problem. I just tested this on a 4th machine here, and still see the problem. Perhaps add a SET SAFETY OFF to the code before running the form?
>>Tracy
>>
>>>Hi Tracy,
>>>
>>>I can not duplicate your problem using your code on Windows XP Professional, vfp8, on either of two systems. It seems to be working fine. I've added around 12 items to the list with no problems.
>>>
>>>Tracy
>>>
>>>
>>>
>>>>The following code uses some VFP8 features. It also shows a problem I have seen on 3 machines, 2 W2K the other XP Pro. All I need to do is click Next, Add, Next on these three workstations, the Add and Next buttons both have highlights around the caption in the command button. When I click and hold the Add button, it does not go down, however the click works. It is acting like a LockScreen is in effect. The grid doesn’t always fill in 100% everytime.
>>>>
>>>>Anybody have a suggestion of what might be done to prevent this behavior?
>>>>
>>*-- SNIP --*
Tracy