Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching Data Environments Dynamically
Message
From
15/08/2000 07:50:31
Arie Van Der Ent
Arie Van Der Ent V.O.F.
Warnsveld, Netherlands
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00404384
Message ID:
00404854
Views:
22
Bill,

Thanks for the solution. It works only part of it. I implemented your sample code. After searching the buttons in the FindForm work well. But there are no search results in the grid.

Here the code I implemented in the button 'cmdFindNow':

** Switch DATA ENVIRONMENT Dynamically
IF ThisForm.cOptionGroupl.Optiongroup.Value = 0
ThisForm.SearchListObj.grdList.Recordsource = .NULL.
ThisForm.oBizObj.oDELoader.cDataEnvironment = ;
"RelatiesBinnenlandFindEnvironment"
ThisForm.oBizObj.LoadDataEnvironment()
*Unlock the screen after the new data environment has loaded
ThisForm.LockScreen = .F.
ENDIF

IF ThisForm.cOptionGroupl.Optiongroup.Value = 1
ThisForm.SearchListObj.grdList.Recordsource = .NULL.
ThisForm.oBizObj.oDELoader.cDataEnvironment = ;
"VIPRelatiesBinnenlandFindEnvironment"
ThisForm.oBizObj.LoadDataEnvironment()
*Unlock the screen after the new data environment has loaded
ThisForm.LockScreen = .F.
ENDIF

**

STORE '%' TO vp_cNaam, vp_cStraat_1, vp_cPostcode_1, vp_cPlaats_1

IF NOT EMPTY(ThisForm.txlNaam.TextBox.Value)
vp_cNaam = '%' + UPPER(ThisForm.txlNaam.TextBox.Value) + '%'
ENDIF

IF NOT EMPTY(ThisForm.txlAdres.TextBox.Value)
vp_cStraat_1 = '%' + UPPER(ThisForm.txlAdres.TextBox.Value) + '%'
ENDIF

IF NOT EMPTY(ThisForm.txlPostcode.TextBox.Value)
vp_cPostcode_1 = '%' + UPPER(ThisForm.txlPostcode.TextBox.Value) + '%'
ENDIF

IF NOT EMPTY(ThisForm.txlPlaats.TextBox.Value)
vp_cPlaats_1 = '%' + UPPER(ThisForm.txlPlaats.TextBox.Value) + '%'
ENDIF

DoDefault()

Can you tell what I did overlook? Thanks in advance.

Arie van der Ent
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform