Reputation: 27
How can I open a form stored in the current directory
do form ADDBS( JUSTPATH(SYS(16,0))) +"\form5.scx" WITH thisform.grid1.Column1.Text1.Value TO aa
I tried this but says that the file doesn't exist
Upvotes: 0
Views: 1562
Reputation: 1
to test what i said copy this code and execute it: you can see there is 2 "\" addbs() works only on what its applied not in the second independent term of the path.
local m.myvar
text to m.myvar noshow
messagebox(ADDBS( JUSTPATH(SYS(16,0))) +"\form5.scx")
_cliptext=ADDBS( JUSTPATH(SYS(16,0))) +"\form5.scx"
endtext
strtofile(m.myvar,"test.prg")
do test
Upvotes: 0
Reputation: 1
ADDBS( JUSTPATH(SYS(16,0))) this adds already a slash ("\") to the path and you add another slash with "\form5.scx" can do do form ADDBS( JUSTPATH(SYS(16,0)))+"form5.scx"
or use relative path or locfile() function
Upvotes: 0
Reputation: 23797
do form form5 with ...
VFP uses relative pathing and also search paths. If it is in current directory then would be the first one to be picked by VFP.
Upvotes: 1