Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access the record afternew
Message
From
25/08/2003 11:18:05
 
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00822103
Message ID:
00823071
Views:
25
I'm attempting to add a childform to an existing form by using afternew or afternew2 (I have tried both). I want to setup the new record prior to calling the childform. It appears that I'm not changing the "new" and blank record but the I'm changing the last record. I'm creating the new record with a call from the an actionbuttonNew. I'm in the afternew routine and check the workarea to insure the right table. I'v also tried just using "replaces" in case the datamanager does something. So what is the correct way to call the child form and insure the it is using the new record?

IF m.cWorkarea = 'Enroll'
THISFORM.cmdatamanager.REPLACE('enroll','clientid',esclient.clientid)
THISFORM.cmdatamanager.REPLACE('enroll','enroll_dte',DATE())
THISFORM.editmode()
THISFORM.openchild('enroll_class.scx')
ENDIF

Also I'm moving the project to VFP8 and I'm having trouble with VFP8 opening a form. I get a syntax error (the form opens correctly using VFP7). I traced it to the load of fmdatachild in class cforms. If "load" returns .f. or .t. it errors. Maybe you know what that is. The offending code follows:

IF DODEFAULT()
* Warn if there are any cursors defined in a native DE for this form (there shouldnt be any).
ASSERT ISNULL(THIS.oCDE) MESSAGE (THIS.Name + ': frmDataChild forms cannot have any Data Environment of their own')
THIS.oCDE = THIS.oCaller.oCDE
RETURN .T.
ENDIF

RETURN .F.

Thanks in Advance
John
John Fabiani
Woodland, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform