Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Browse" command not working in EXE

Status
Not open for further replies.

Ashr

Programmer
Apr 19, 2005
46
HU
I put a command in an command button like :
Code:
 use myfile.dbf in 0 shared
select myfile
browse noedit,nodelete
when runnig the exe program & clicking on the command button nothing happend , after clicking again few times open's a file dialog to select/open a DBF file , the files for this form program r declared in the load mhetod of the form so why the program opens a dialog "Open file" , the browse command is supose to browse the current table.

Thank's for any help.
 
Are you familiar with asserts and debugging? Seems to be the only way to find out what's going on.
Also, if all necessary files are opened in the Load(), why do you USE myfile in your function?

Volker/
 

Ashr,

Are you saying that it worked OK in the development environment, but not when run as an EXE?

If so, that might be because the table is not in the search path. Are you explicitly setting the path at run time, or are you relying on whatever it was set to in the development environment. Maybe you should try hard-coding the path in with the name of the file (in the USE command); if the form then works, you'll know that it is indeed a pathing issue.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
When I tried your code I got an error because the comma is not valid. try :
Code:
BROWSE NOEDIT NODELETE

It could be just the VFP version - I'm using VFP9.

Mike Krausnick
Dublin, California
 
Thank's guy's for your replay , the comma is my mistake , it's not in the code , I put the "use myfile" in the functaion thinking that the file isn't there in the work area , didn't solve the problem (strange). I don't realy know to use the debugger, in the Load mhetod befor opening all the tables I need in the form I used also "Set Path" for the files folder. I have another place in the form were Browse command is placed & it's also not working. in development environment it's working fine & in EXE it's not working.
 
As I mentioned before
after clicking again few times open's a file dialog to select/open a DBF file , the files for this form program r declared in the load mhetod of the form so why the program opens a dialog
since the file is supose to be open maybe the Browse command is using another work area , can I declare in my form(s) one work area which will serve all my forms/programs??? it might solve the problem I think.
 
Hi Ashr,

Put a SET STEP ON in your code to invoke the debugger.

Regards,

Mike
 
Not sure if this works from an exe, though.

Regards,

Mike
 

Perhaps this is a top-level application? Where under certain conditions the browse command does not appear?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
It's realy a top-level app. or top-level form without VFP screen.
 
Hi Ashr,

I just tried putting SET STEP ON in the Load Event of a form, compiling it and then running the exe with the debugger inside the IDE. Worked.

Regards,

Mike
 
Thank's Mike , in my EXE it doesn't work , maybe becase I have 2 forms in the EXE , one form is a simple form which have command buttons to activate certain other forms & the form which is customer's form. The 2nd form customer form is the problematic one. The first form is a Top-level form & the customer form is In-top level form.

Your help is appreciate

Blum
 

As I suggested above your problem with the browse is related to the fact that your are using a top-level application, where browse usually opens up in the _screen portion of the application, in a top level app you remove the _screen. I suggest you use another top-level form with a grid on it. Browse windows a normally use for developers, not end users.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Blum,

Don't understand why it won't work. What version of VFP are you using?

Maybe I wasn't clear.

1. Compile the exe that has SET STEP ON in a Load event
2. While in VFP use Tools->Debugger to start the debugger
3. In the Debugger open the exe that you compiled in step 1
4. Open the form that has SET STEP ON in it's Load event

Regards,

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top