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

Input and Edit data in Browse Windows

Status
Not open for further replies.

PankX

Programmer
May 10, 2002
29
ID
Anybody know how to add and edit data in a noedit noappend nodelete Browse Windows from a program ?

Thank's
Pram
pram@sby.centrin.net.id
 
Are you working with an executable that was originally developed in FoxPro? If so, and the dbf files are included inside the exe, you are SOL unless you get the source code and modify it. If you are working with a FoxPro program that wasn't built into an exe, you can modify the dbf files within the FoxPro environment. Just be careful that you don't mess up the relationships. FoxPro 2.6 doesn't have relational integrity checks like Access or Visual FoxPro. If you change or add records, you might need to change or add records to a parent or child dbf to maintain the integrity of the database.
 
Pram,
The simple answer is to remove the "noedit noappend nodelete" options from the Browse statement - otherwise, you can't.

Rick
 
Pram -
If you can sneak an "ON KEY LABEL ?? DO myworkaround" in before the browse you speak of, you should be able to open the table again under a different alias and modify or add whatever you want.

Steve
 
Hi, this is the program

sele kaskecil
set shadow off
defi wind w1 from 2,2 to 19,77 title ' KAS KECIL ' in desktop color scheme 10
acti wind w1
on key label f1 do calladd
brow field tanggal:W=.f.:H='Tanggal',proyek:6:W=.f.:H='Proyek' ;
,jenis:5:W=.f.:H='Jenis',keterangan:15:W=.f.:H='Keterangan' ;
,matauang:3:W=.f.:H=' ' ;
,jumlahasin:W=.f.:H='Terima':p='999,999,999.99' ;
,jumlahasou:W=.f.:H='Keluar':p='999,999,999.99' ;
color scheme 10 in wind w1
on key label f1

proc calladd
sele kaskecil
appe blan
**** Then, what command i must use to edit that new record ?

Thank's
Pram


 
Pram,

Add another on key label and call an edit screen in it's own window. It will pick up the current record in the browse if you are only using the table once. Make your changes and close the screen.

Or

If you add a separate window and edit fields to your calladd procedure, you could add and/or edit in one operation.

*Define new screen/window
*activate window
*If new record, scatter to memvar blank
*else scatter memvar
*use appropriate @say/get fields with memvars
*edit as necesary
*confirm
*if ok
*if new - insert into table from memvar
*else - gather memvar
*else clear/discard
*release window

Steve
 
What about if i want to edit the data in the browse window directly ?

Any idea ?

Thank's
Pram
 
As long as it is open with a BROWSE NOEDIT..., you can't. You have to reBROWSE it.

Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top