Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot find Alias more specific...
Message
From
06/03/1998 02:50:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00082881
Message ID:
00082900
Views:
29
>Sawadee Kahp,
>
>To be more specific, my problem is this:
>
>---
>This code causes a subsequent do form xxx to err: Cannot find Alias xxx
>In Combo1.Valid:
>
>LOCAL nCurArea
>nCurArea = SELECT()
>cfgProj = ALLTRIM(THISFORM.Combo1.Value) *DropDown value
>USE projects AGAIN *Open lookup
>SET ORDER TO project
>SEEK cfgProj *Find Value
>IF FOUND()
> cfgProjPre = ALLTRIM(prefix) *Set table prefix
> ? cfgProjPre *Confirm
>ENDIF
>SELECT(nCurArea)
>
>Then cfgProj and cfgProjPre are used to specify the form to open.
>---
>This code does not cause any errors:
>
>In button.Click:
>
>cfgProj = "xxx"
>cfgProjPre = "xxx"
>
>Then cfgProj and cfgProjPre are used to specify the form to open.
>---
>I really need to use a combobox here...;)
>
>Eric K.
Eric still not clear. But something I could see, if not a match found cfgProjpre is not assigned a value (???).
cfgProj = ALLTRIM(THISFORM.Combo1.Value)    &&DropDown value
USE projects AGAIN in 0 alias prj order tag project  &&Open lookup
cfgProjPre = iif(;
             SEEK(cfgProj, "prj", "project"), ;
             ALLTRIM(project.prefix),;
             ???)                         &&Find Value&Set table prefix
? cfgProjPre                              &&Confirm
But I think it's not assigning a value to cfgPorjPre. If the code is really typed as in your prg, here :
LOCAL nCurArea
nCurArea = SELECT()                         && Store current area
cfgProj = ALLTRIM(THISFORM.Combo1.Value)    
USE projects AGAIN                          &&Open lookup in same work area
SET ORDER TO project
SEEK cfgProj                                
IF FOUND()
  cfgProjPre = ALLTRIM(prefix)              
  ? cfgProjPre                              
ENDIF
SELECT(nCurArea)                            && Useless it would be "projects.dbf"
So could you be losing your alias at entry ? If it's the case take care of opening a new table "use ... in 0" or "select 0 + use ...".
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform