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

BROWSE functionality 1

Status
Not open for further replies.

kiglid

Programmer
Aug 8, 2002
15
0
0
CA
Is there a way to lock records in the browse window? I need to be able to let the users add new records and edit each field, but also ensure they don't edit existing fields in that same browse window. Thanks!
 
Could you please expand on the ' read-only scrollable list on an append screen'. Is that still using the browse command or is it totally different?
 
There are a variety of ways to approach your goal. Here are a couple of them.

1. Use the Browse window to display existing records in a Read-Only manner. As new records are added to the table they too will be displayed as Read-Only in the Browse window.

To Add new records, place Get fields on the same screen (use GENSCRNX to combine Browse & GET fields). These GET fields will hold memory variables. The users enter desired data into these fields and then press a SAVE key and the new record is APPENDED and the contents of the memory variables are REPLACED into the new record.

2. Do everything within the single Browse window.
Add an additional logical field to the table being Browsed and named something like LOCK or READONLY, but it should not be displayed within the Browse.
On originally opening the table in the Screen, REPLACE ALL LOCK WITH .T.
As new records are added, this field is defaulted to .F.

Now go into the WHEN and VALID snippets of the and check for the value of this LOCK field. If it is TRUE then do not allow changes and revert field value to original value (gathered and saved in the WHEN code).

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Thank you JRB-Bldr, I hope they pay you well!

I really like the sound of your second option, I'll play around with it and see if I can get it to work.

The other part is to convince the client to make the change, the application is scheduled to be replaced by next February. Therefore they don't want to throw a lot more time into it, but as it stands it is causing data problems...but I digress....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top