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!

How can I use only speific cells by using Brows Comand

Status
Not open for further replies.

MAliShah

Programmer
Nov 22, 2002
27
Dear all
I have a very basic question and hope u won't ind it.
I have two columns (say detail and amount) of a foxpro table. the structure is as under:
Detail Amount
====== =======
1. Currency and Deposits
A. Currency
i) Local Currency xxxxxx
ii)Foreign Currency xxxxxx

I want to use simple browse command where I want full display of detail but want the cursor remaining only cells in i) & ii) . In generic I want to know that is there any way to chose only specific cells for entry and the rest be remain fixed and displayed and totals and sub-totals can be replaed automatically by using browse command? Any other suggestion is also welcomed.
Thanks in advances
 
There is a way to show all columns while allow edit only one field: it's a BROW FREEZE command.
If you'll look in help for Browse you'll see what you can set name, format, editable status :) what you actually need) for any field.
(ex from Help:
BROWSE FIELDS cust_id:R, company
cust_id made read-only
)
As for displaying and re-calculationg totals - I do not know.
 
MaliShah,

One suggestion for recalculating totals would be to run the BROWSE command
Code:
BROWSE FIELDS detail:R,local currency, foreign currency,var1=local currency+foreign currency
then the "field" var1 shown in the browse window would update as you changed the values in the currency fields.

My showing adding the 2 field together is just an example, you could divide, multiply and so on, but you could only have something that works on each row.

May I ask why you want to do this in a browse window rather than using a grid in a form?


Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top