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

Basic Subfile update code

Status
Not open for further replies.

philk12

Programmer
Dec 29, 2005
20
0
0
US
HI I am used to doing a subfile update having the user place an X next to the line they want to update and then displaying this record on a separate screen, allowing the update.

Now I have to allow them to directly change the data on the line I am not sure of the code sequence.

Perhaps someone has some basic code that does this or could do a walkthru on this?

Thanks,
Phil
 
the key here is the command READC (read changed record)

READC FORMATNAME

this will return those records from a subfile that have been changes while on the screen - i.e. the option field has been updated

loop through these records and process each one as appropriate

keep in mind that if someone puts X in the select field and then replaces this with a blank then this will be returned as a changed record - you therefore have to check the value of this field and go straight on to the next record if the select field is blank
 
forgot to mention - you can't easily update the values on the screen dynamically - if the changes need to be displayed straight away in the subfile then you have 2 choices

1) repopulate the subfile
2) use UIM lists instead of subfiles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top