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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BROWSE with FREEZE field, field ?

Status
Not open for further replies.

diarmaid

Programmer
Jun 27, 2003
34
IE

Here is a routine I have to attempt to "FREEZE" (only allow editing) in fields numbered 3 to highest field number in a table I want to BROWSE. As the number of fields is changeable I tried substuting as below for the "FREEZE" statement, but it doesn't work ? Is there a way around this that anyone used? (VFP8)

*-------------
LOCAL lcFreezeString
lcFreezeString = ""

SELECT prices
FOR i = 3 to FCOUNT()
lcFreezeString = lcFreezeString +(field(i))+", "
ENDFOR

lcFreezeString = LEFT(lcFreezeString,LEN(ALLTRIM(lcFreezeString))-1) && to remove trailing comma

BROWSE NODELETE NOAPPEND FREEZE (lcFreezeString)
*-------------
 
Hi

Sorry .. I undestood wrongly and answered earlier.

If you want to browse/edit all fields number 3 onwards..

Code:
SELECT myTable
cFields = FIELD(1) + [:W=.f.,] + FIELD(2) + [W:.f.]
FOR i = 3 TO FCOUNT()
   cFields = cFields+[,]+FIELD(i)
ENDFOR
BROWSE FIELDS &cFields

:)

____________________________________________
ramani - (Subramanian.G) :)
 
About the FREEZE keyword - it actually freezes every field except the one you specify.

Stewart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top