Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unknown member using WITH....ENDWITH
Message
From
12/03/2002 10:00:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Unknown member using WITH....ENDWITH
Miscellaneous
Thread ID:
00631488
Message ID:
00631488
Views:
53
I'm sure I'll slap myself silly when somebody answers this but I don't see what is causing the error.

I inherited a VFP 6 application which was converted from FPD 2.5 using the conversion programs. The converter apparantly takes the FPD screens and turns them into a FormSet. There is one Form in the FormSet. The INIT method of this form has the following code
*-- RCM 06/11/01 Enable editing of payment type on loss policies.
IF CHHEADER.CASH_NOTE="C"

   THISFORM.PageFrame1.Page1.Label13.CAPTION = "Cash"
   THISFORM.PageFrame1.Page1.cmdCashToNote.ENABLED = .T.
   THISFORM.PageFrame1.Page1.cmdCashToNote.CAPTION = 'Change Payment Type to "NOTE"'
   THISFORM.PageFrame1.Page1.chkCashWithApp.VALUE = IIF(CHHEADER.CWAPP, 1,0)
   THISFORM.PageFrame1.Page1.chkCashWithApp.VISIBLE = .T.
   THISFORM.PageFrame1.Page1.lblCashWithApp.caption = "Cash with App."
ELSE
               .
               .
               .
ENDIF
I thought it would be better to code this as a WITH...ENDWITH block and converted it to
*-- RCM 06/11/01 Enable editing of payment type on loss policies.
WITH THISFORM.PageFrame1.Page1
   IF CHHEADER.CASH_NOTE="C"

      .Label13.CAPTION = "Cash"
      .cmdCashToNote.ENABLED = .T.
      .cmdCashToNote.CAPTION = 'Change Payment Type to "NOTE"'
      .chkCashWithApp.VALUE = IIF(CHHEADER.CWAPP, 1,0)
      .chkCashWithApp.VISIBLE = .T.
      .lblCashWithApp.caption = "Cash with App."
   ELSE
               .
               .
               .
   ENDIF
ENDWITH
Running this version, however, produces an "UNKNOWN MEMBER" error for each of the six lines.

Any insight as to what is wrong will be extremely appreciated.

Thanks to all.........Rich
Next
Reply
Map
View

Click here to load this message in the networking platform