Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a existing form to a formset
Message
From
12/04/2002 00:54:11
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00643822
Message ID:
00644099
Views:
16
hi, neetu,

you can open the formset and form as DBF
pls consider the following code:
attention: before you do this, pls backup you source form


do addform with "M1.scx", "M2.scx" && M1 is the formset, M2 is the single form


Addform.prg
PARAMETERS formsetname, formname
LOCAL iComment
SET DELETED ON
CLOSE ALL

SELECT 0
USE (formname)
DELETE ALL FOR platform="COMMENT" && delete the first and the last recorder
GO TOP
DELETE && delete the data environment recorder

REPLACE ALL parent WITH "Formset."+ALLTRIM(parent) && assume the formset'name is formset

GO TOP && loacte the form property recoder
REPLACE parent WITH formsetname && replace the parent property with formsetname

USE

SELECT 0
USE (formsetname)

GO BOTTOM
iComment=properties

DELETE
APPEND FROM (formname)

APPEND BLANK
REPLACE platform WITH "COMMENT"
REPLACE uniqueid WITH "RESERVED"
REPLACE properties WITH iComment

PACK
CLOSE ALL
FengFeng(MCSD)
Previous
Reply
Map
View

Click here to load this message in the networking platform