Walter Meester
HoogkarspelNetherlands
General information
Category:
Forms & Form designer
Also relating to the report designer question:
Another programmer wrote this code:
Which always brings up the report designer tool bar:
PUSH MENU _MSYSMENU
SET SYSMENU TO _MSM_FILE, _MSM_EDIT
ThisForm.CheckResource()
MODIFY REPORT filename
SET STATUS BAR OFF
POP MENU _MSYSMENU
Where: Check resource looks like:
**********************start check resource**********************************************
LOCAL cOAlias, lOk, cCurrentRFile
cOAlias = ALIAS()
cCurrentRFile = SYS(2005)
SET RESOURCE OFF
lOk = .T.
ON ERROR lOk = .F.
USE &cCurrentRFile EXCLUSIVE IN 0
=SetOnError()
IF lOk
SELECT FoxUser
GO TOP
LOCATE FOR TYPE = "PREFW" AND ID = "REPORTTOOLS"
IF FOUND()
REPLACE CKVal WITH 60721, ;
Updated WITH DATE()
ELSE
INSERT INTO FoxUser (Type, Id, Name, Readonly, CKVal, Data, Updated) ;
VALUES ("PREFW", "REPORTTOOLS", "", .F., 60721, "", DATE())
ENDIF
USE IN FOXUSER
ENDIF
SET RESOURCE ON
SET RESOURCE TO &cCurrentRFile
IF NOT EMPTY(cOAlias)
SELECT (cOAlias)
ENDIF
**********************End check resource**********************************************
Question:I need a version for the form designer but can't seem the figure out what to put in this check resource function.
I tried:
IF lOk
SELECT FoxUser
GO TOP
LOCATE FOR TYPE = "PREFW" AND ID = "FORMTOOLS"
IF FOUND()
REPLACE CKVal WITH 30445, ;
Updated WITH DATE()
ELSE
INSERT INTO FoxUser (Type, Id, Name, Readonly, CKVal, Data, Updated) ;
VALUES ("PREFW", "FORMTOOLS", "", .F., 30445, "", DATE())
ENDIF
USE IN FOXUSER
ENDIF
But no luck??!?!?
Any ideas. The biggest question is where is this documented and what should.
ckval be?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only