Вот полный код программы. При нажатии на кнопку Поиск появляется та дочерняя форма
Add(MainForm,7745805,413,168)
{
Width=1317
Height=819
Caption="База ремонтов"
Position=1
Point(onClose)
link(onCreate,6126171:doOpen,[])
link(onClose,6126171:doClose,[])
}
Add(Button,2538230,462,287)
{
Left=10
Top=10
Width=110
Caption="Добавить"
link(onClick,3731829:doWork1,[])
}
Add(MTStrTbl,947388,413,224)
{
Left=10
Top=40
Width=1280
Height=305
Name="mtst"
Columns=#4:№=40|7:Дата=70|11:Фамилия=300|12:Описание=400|10:Работа=400|8:Сумма=65|
ChangeWidth=1
Point(doSetFocus)
Point(Row)
Point(onDblClick)
link(onClick,6602222:doWork1,[(471,230)(471,461)])
}
Add(Button,4446188,462,371)
{
Left=130
Top=10
Width=110
Caption="Изменить"
link(onClick,39975:doWork1,[])
}
Add(Button,15445199,441,546)
{
Left=250
Top=10
Width=110
Caption="Поиск"
link(onClick,382362:doWork1,[])
}
Add(DS_SQLite,6126171,567,182)
{
Name="mdb"
FileName="Clients.db"
WaitClose=0
link(onOpen,7203295:doExec,[])
}
Add(DSC_Exec,7203295,623,182)
{
SQL="CREATE TABLE IF NOT EXISTS[tab1](\r\n [id] INTEGER PRIMARY KEY AUTOINCREMENT, \r\n [date] TEXT, \r\n [familia] TEXT, \r\n [opisanie] TEXT, \r\n [work] TEXT, \r\n [summa] TEXT);"
DSManager="mdb"
link(onExec,8256804:doEvent1,[])
}
Add(DSC_Query,301125,728,189)
{
SQL="SELECT\r\n id, \r\n date,\r\n familia,\r\n opisanie,\r\n work,\r\n summa \r\nFROM tab1;\r\n"
DSManager="mdb"
link(onQuery,5887078:doAddRow,[])
}
Add(MST_DB,5887078,784,189)
{
MSTControl="mtst"
}
Add(Hub,8256804,679,182)
{
InCount=3
OutCount=3
link(onEvent1,15751595:doClear,[(703,188)(703,153)])
link(onEvent2,301125:doQuery,[])
link(onEvent3,13789751:doSortDigit,[(711,202)(711,244)])
}
Add(MST_Clear,15751595,728,147)
{
MSTControl="mtst"
}
Add(MST_SortInCol,13789751,728,231)
{
MethodSort=1
MSTControl="mtst"
Point(doSortDigit)
}
Add(ChildForm,3731829,511,287)
{
link(onEvent1,8256804:doEvent2,[(611,293)(611,195)])
}
BEGIN_SDK
Add(EditMulti,1491838,21,14)
{
EventCount=1
WorkCount=1
Width=573
Height=291
link(doWork1,475173:doEvent1,[(67,20)(67,62)])
}
Add(MainForm,13367302,119,28)
{
Left=35
Top=105
Width=906
Height=338
Visible=1
Position=3
Point(doVisible)
}
Add(Button,1416819,168,189)
{
Left=390
Top=255
Width=110
Height=30
Font=[MS Sans Serif,8,1,0,1]
Caption="Добавить"
link(onClick,15597162:doString,[])
}
Add(Edit,13718670,294,112)
{
Left=130
Top=30
Width=310
Text=""
}
Add(Label,10493128,224,28)
{
Left=10
Top=5
Width=30
Height=17
Caption="Дата"
}
Add(DSC_Exec,12580462,301,189)
{
DSManager="parent.mdb"
link(onExec,2150116:doEvent1,[])
}
Add(Label,8723371,294,70)
{
Left=130
Top=10
Width=53
Height=17
Caption="Фамилия"
}
Add(Edit,1991437,336,112)
{
Left=5
Top=80
Width=435
Height=110
Text=""
}
Add(Label,10818380,336,70)
{
Left=5
Top=60
Width=54
Height=17
Caption="Описание"
}
Add(Label,7006651,378,70)
{
Left=450
Top=60
Width=40
Height=17
Caption="Работа"
}
Add(Edit,6769963,378,112)
{
Left=450
Top=80
Width=435
Height=110
Text=""
}
Add(Edit,10926788,420,112)
{
Left=5
Top=220
Width=120
Text=""
DataType=1
}
Add(Label,14976561,420,70)
{
Left=5
Top=200
Width=39
Height=17
Caption="Сумма"
}
Add(DateConvertor,5015877,224,112)
{
Mode=9
Format="dd-MM-yyyy"
Point(Result)
Point(Data)
link(Data,12298793:DateTime,[(230,107)(237,107)])
}
Add(FormatStr,15597162,224,189)
{
DataCount=5
Mask="INSERT\r\nINTO\r\n [tab1](\r\n [date],\r\n [familia],\r\n [opisanie],\r\n [work],\r\n [summa])\r\nVALUES(\r\n '%1',\r\n '%2',\r\n '%3',\r\n '%4',\r\n %5);\r\n"
link(onFString,12580462:doExec,[])
link(Str1,5015877:Result,[])
link(Str2,13718670:Text,[(237,152)(300,152)])
link(Str3,1991437:Text,[(244,159)(342,159)])
link(Str4,6769963:Text,[(251,166)(384,166)])
link(Str5,10926788:Text,[(258,173)(426,173)])
}
Add(Hub,2150116,378,189)
{
link(onEvent1,1491838:onEvent1,[(466,195)(466,20)])
link(onEvent2,14722169:doDeferredEvent,[(410,202)(410,230)])
}
Add(DoData,7108916,476,224)
{
Data=Integer(0)
link(onEventData,475173:doEvent2,[(521,230)(521,274)(67,274)(67,69)])
}
Add(DeferredEvent,14722169,420,224)
{
link(onDeferredEvent,7108916:doData,[])
}
Add(Hub,475173,77,56)
{
InCount=2
link(onEvent1,13367302:doVisible,[])
link(onEvent2,3131699:doWork1,[(109,69)(109,97)(186,97)])
}
Add(Time,12298793,224,70)
{
Time_Date=1
Format="D M:Y"
Point(DateTime)
}
Add(HubEx,3131699,182,112)
{
link(onEvent,5015877:doConvert,[])
}
Add(DatePicker,11740223,112,112)
{
Left=5
Top=30
Width=115
Height=21
link(onChange,3131699:doWork2,[])
}
END_SDK
Add(ChildForm,39975,511,371)
{
link(onEvent1,8256804:doEvent3,[(611,377)(611,202)])
link(Data1,2754020:Var3,[(517,292)])
}
BEGIN_SDK
Add(EditMulti,13011679,21,14)
{
EventCount=1
WorkCount=1
DataCount=1
Width=797
Height=480
link(doWork1,5832317:doEvent1,[(67,20)(67,62)])
}
Add(MainForm,928490,119,28)
{
Left=35
Top=105
Width=906
Height=338
Visible=1
Position=3
Point(doVisible)
}
Add(Button,12215766,203,301)
{
Left=390
Top=255
Width=110
Height=30
Font=[MS Sans Serif,8,1,0,1]
Caption="Изменить"
link(onClick,3129647:doString,[])
}
Add(Edit,14344690,371,224)
{
Left=150
Top=30
Width=310
Text=""
}
Add(Label,8784403,245,98)
{
Left=5
Top=30
Width=57
Height=29
Font=[MS Sans Serif,15,1,0,1]
Caption="Дата"
}
Add(DSC_Exec,6409374,378,301)
{
DSManager="parent.mdb"
link(onExec,3089475:doEvent1,[])
}
Add(Label,3803848,371,182)
{
Left=150
Top=10
Width=53
Height=17
Caption="Фамилия"
}
Add(Edit,5654748,413,224)
{
Left=5
Top=80
Width=435
Height=110
Text=""
}
Add(Label,3257238,413,182)
{
Left=5
Top=60
Width=54
Height=17
Caption="Описание"
}
Add(Label,10297054,455,182)
{
Left=450
Top=60
Width=40
Height=17
Caption="Работа"
}
Add(Edit,11170679,455,224)
{
Left=450
Top=80
Width=435
Height=110
Text=""
}
Add(Edit,6100857,497,224)
{
Left=5
Top=220
Width=120
Text=""
DataType=1
}
Add(Label,10505365,497,182)
{
Left=5
Top=200
Width=39
Height=17
Caption="Сумма"
}
Add(FormatStr,3129647,301,301)
{
DataCount=6
Mask="UPDATE\r\n [tab1]\r\nSET\r\n [familia] = '%2',\r\n [opisanie] = '%3',\r\n [work] = '%4',\r\n [summa] = '%5'\r\nWHERE\r\n [id] = %6;"
link(onFString,6409374:doExec,[])
link(Str2,14344690:Text,[(314,264)(377,264)])
link(Str3,5654748:Text,[(321,271)(419,271)])
link(Str4,11170679:Text,[(328,278)(461,278)])
link(Str5,6100857:Text,[(335,285)(503,285)])
link(Str6,4755838:Value,[(342,279)(244,279)])
}
Add(Hub,3089475,441,301)
{
link(onEvent1,13011679:onEvent1,[(466,307)(466,20)])
link(onEvent2,2868402:doDeferredEvent,[(476,314)(476,342)])
}
Add(DoData,8975738,553,336)
{
Data=Integer(0)
link(onEventData,5832317:doEvent2,[(597,342)(597,206)(65,206)(65,69)])
}
Add(DeferredEvent,2868402,497,336)
{
link(onDeferredEvent,8975738:doData,[])
}
Add(Hub,5832317,77,56)
{
InCount=2
OutCount=3
link(onEvent1,928490:doVisible,[])
link(onEvent2,8170284:doSeparateMT,[(129,69)(129,139)])
}
Add(MT_MultiData,8170284,168,133)
{
Count=6
Point(Data)
Point(RemaindData)
link(onData1,4755838:doValue,[(219,139)(219,230)])
link(onData2,8784403:doText,[(212,146)(212,104)])
link(onData3,14344690:doText,[(286,153)(286,230)])
link(onData4,5654748:doText,[(306,160)(306,230)])
link(onData5,11170679:doText,[(328,167)(328,230)])
link(onData6,6100857:doText,[(348,174)(348,230)])
link(Data,13011679:Data1,[(174,73)(27,73)])
}
Add(Memory,4755838,238,224)
{
}
Add(Label,2151521,245,56)
{
Left=5
Top=10
Width=30
Height=17
Caption="Дата"
}
END_SDK
Add(GetDataEx,2754020,434,287)
{
Angle=3
link(Data,947388:Select,[(419,292)])
}
Add(ChildGroupBox,6602222,497,455)
{
link(Data1,2754020:Var1,[(503,281)(440,281)])
}
BEGIN_SDK
Add(EditMulti,7158192,21,21)
{
WorkCount=1
DataCount=1
Width=797
Height=550
link(doWork1,10638613:doSeparateMT,[(67,27)(67,111)(164,118)(164,188)])
}
Add(GroupBox,11911772,35,35)
{
Left=10
Top=360
Width=895
Height=410
Caption=""
}
Add(Label,11604296,280,105)
{
Left=5
Top=10
Width=30
Height=17
Caption="Дата"
}
Add(Edit,11671383,406,273)
{
Left=150
Top=30
Width=310
Enabled=1
Text=""
ReadOnly=0
}
Add(Label,8815771,280,147)
{
Left=5
Top=30
Width=57
Height=29
Font=[MS Sans Serif,15,1,0,1]
Caption="Дата"
}
Add(Label,5413725,406,231)
{
Left=150
Top=10
Width=53
Height=17
Caption="Фамилия"
}
Add(Edit,12428065,448,273)
{
Left=5
Top=80
Width=435
Height=110
Enabled=1
Text=""
ReadOnly=0
}
Add(Label,8424378,448,231)
{
Left=5
Top=60
Width=54
Height=17
Caption="Описание"
}
Add(Label,11726734,490,231)
{
Left=450
Top=60
Width=40
Height=17
Caption="Работа"
}
Add(Edit,1011414,490,273)
{
Left=450
Top=80
Width=435
Height=110
Enabled=1
Text=""
ReadOnly=0
}
Add(Edit,2308080,532,273)
{
Left=5
Top=220
Width=120
Enabled=1
Text=""
DataType=1
ReadOnly=0
}
Add(Label,881908,532,231)
{
Left=5
Top=200
Width=39
Height=17
Caption="Сумма"
}
Add(MT_MultiData,10638613,203,182)
{
Count=6
Point(Data)
Point(RemaindData)
link(onData2,8815771:doText,[(247,195)(247,153)])
link(onData3,11671383:doText,[(321,202)(321,279)])
link(onData4,12428065:doText,[(341,209)(341,279)])
link(onData5,1011414:doText,[(363,216)(363,279)])
link(onData6,2308080:doText,[(383,223)(383,279)])
link(Data,7158192:Data1,[(209,102)(27,102)])
}
END_SDK
Add(ChildForm,382362,490,546)
{
}
BEGIN_SDK
Add(EditMulti,740293,21,14)
{
EventCount=1
WorkCount=1
DataCount=1
Width=797
Height=480
link(doWork1,6789909:doVisible,[(67,20)(67,62)])
}
Add(MainForm,6789909,140,28)
{
Left=35
Top=105
Width=1317
Height=338
Visible=1
Position=3
Point(doVisible)
Point(onClose)
link(onClose,7936292:doClear,[(278,55)(278,97)])
}
Add(Button,8958237,203,154)
{
Left=10
Top=70
Width=110
Height=30
Font=[MS Sans Serif,8,1,0,1]
Caption="Искать"
link(onClick,10677122:doString,[])
}
Add(Edit,5217928,259,112)
{
Left=10
Top=30
Width=310
Text=""
}
Add(Label,2720308,259,35)
{
Left=10
Top=10
Width=53
Height=17
Caption="Фамилия"
}
Add(FormatStr,10677122,259,154)
{
DataCount=1
Mask="SELECT value FROM tab1 WHERE value LIKE '^%1^'"
link(onFString,7157604:doReplace,[])
link(Str1,5217928:Text,[])
}
Add(MTStrTbl,9246759,154,147)
{
Left=10
Top=110
Width=1280
Height=180
Name="mtstsearch"
Columns=#4:№=40|7:Дата=70|11:Фамилия=300|12:Описание=400|10:Работа=400|8:Сумма=65|
ChangeWidth=1
Point(doSetFocus)
Point(Row)
Point(onDblClick)
}
Add(MST_DB,11513766,448,154)
{
MSTControl="mtstsearch"
}
Add(MST_Clear,7936292,385,91)
{
MSTControl="mtstsearch"
}
Add(Replace,7157604,322,154)
{
SubStr="^"
DestStr="%"
link(onReplace,2595244:doQuery,[])
}
Add(DSC_Query,2595244,385,154)
{
DSManager="parent.mdb"
link(onQuery,11513766:doAddRow,[])
}
END_SDK