Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Choose cancel
Message
From
15/08/2004 06:52:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00930924
Message ID:
00933408
Views:
20
hi,

i useto your code to make a cancel, if i don't want compleate the operation

as my code ,but i get error message at append command(No table is open in the current work area ) in mycode,and when i make cancel,
at the begining he go to dirfile,i want to make cance return me back at my form ex.. thisform.text1.value or just at my form.

this is the code.
SET TALK OFF
SET ECHO off
SET CENTURY ON

thisform.text2.Value="NEWDNC"
THISFORM.Olecontrol3.Visible=.T.
GETDIR()
local lcfile
lcfile=getfile()
if empty(lcfile)
   thisform.text2.setfocus()
   thisform.text2.Value=SPACE(10)
   else
 thisform.text1.Value = lcfile


SET DEFAULT TO e:\samerqda
LOCAL lcTableName
lcTableName = thisform.text2.value  

CREATE TABLE &lcTableName (char1 c(10), char2 c(70),char3 c(10), char4 c(10),char5 c(10), char6 c(40),fld10 c(40))
NOCPTRANS)
APPEND FROM (thisform.text1.value)TYPE XLS
GO TOP
DELETE NEXT 1 
SET DELETED on
REPORT FORM nes preview
*REPORT FORM NES TO PRINTER PROMPT PREVIEW IN WINDOW myPreviewForm
*REPORT FORM nes TO PRINTER PROMPT PREVIEW
m.a=thisform.text2.Value
CLOSE all
USE (m.a)
gcDelimName = ALIAS( ) + '.xls'
gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
IF EMPTY(gcDelimFile)  && Esc pressed
   CANCEL
ENDIF
COPY TO (gcDelimFile) xls for recno()>2 && or 1
MODIFY FILE (gcDelimFile) NOEDIT
ENDIF
thanks.

regards.
Previous
Reply
Map
View

Click here to load this message in the networking platform