VXFORM4 Buyer Details Form1- Label1 Tms Rmn BuyCode Label2 Aircraft Type Tms Rmn BuyType BuyTypeHelp Tms Rmn BuyTypeDesc Label3 Low Price Tms Rmn BuyLow Label4 High Price Tms Rmn BuyHigh BuySave &Save BuyCancel &Cancel BuyAdd BuyDelete &Delete BuyNext &Next BuyPrevious &Previous BuyBrowse &Browse BuyExit E&xit Label5 Status Tms Rmn BuyStatus Form_Load7 vxSelectDbfb AirbuyerDbf Form4Active BuyerReturn BROWSE_ADD BuyerDataClear( BuyStatus BuySave Enabled? BuyCancel7 BuyAddl FALSE BuyDeleteL BROWSE_EDIT BuyerDataLoad vxRecNo, Form_Unload CancelJ BROWSE_USERk vxClose AirtypesDbf StatesOpen AircustDbf vxSelectNtx Aircust1Ntx vxSeek CustKey CustReturnG VXFORM3 BuyCode BuyType BuyTypeDesc BuyLow BuyHighX b_low b_high CursorWaitw EnableBuyerData vxDoubleJ vxField vxUnlock CursorArrow DisableBuyerData BuyAdd_Click BuyBrowse_Click VXFORM4 Visible BuyerRec BrowseBuyers BuyCancel_Click; BuyDelete_Click vxDeleteRec BuyExit_Clickl BuyHigh_KeyPress KeyAscii BuyLow_KeyPress BuyType_GotFocus vxCtlLength BuyType_KeyPress BuyType_LostFocus EmptyString~ BuyNext_Click EndFile vxSkip5 BuyNextW BuyPrevious BuyBrowseA vxEof% vxBottom vxBof vxDeletedk BuyHigh_GotFocus BuyLow_GotFocus BuyPrevious_Click BegFile BuySave_Click TypeKey SeekKey vxAppendBlank vxReplString vxReplDouble3 vxWrite BuyTypeHelp_Click AirtypesNtx TypeReturnU vxBrowse Hwnd~ Form_Paintd vxFormFramer vxCtlStyle VX_RAISE VX_RECESS BROWSE_DELETE Form_Load Record addition request" if user pressed ENTER then file is positioned at current record and the record number isn returned in BuyerReturn. In this case we assume he wants to edit that record. call general proc to load controls- Edit record Form_Unload BuyerDataClear BuyerDataLoad b_low" b_high #######0 #######0 b_cat" b_desc b_code EnableBuyerData DisableBuyerData BuyAdd_Click clear form for addition of new record Record Addition Request" ensure data entry enabled reset the buttons BuyBrowse_Click ensure we're positioned to top rec of group so we don't close files when we unload the form No buyer records on file!" BuyCancel_Click Clear form data and reset button status Operation cancelled" BuyDelete_Click get user confirmation of delete Confirm Delete Deleted Delete failed" Delete cancelled BuyExit_Click BuyHigh_KeyPress {Tab}" BuyLow_KeyPress {Tab}" BuyType_GotFocus b_cat"# BuyType_KeyPress convert to uppercase {Tab}" BuyType_LostFocus catname" BuyNext_Click skip forward one record if skip error, only allow exit Error on Skip Next. Try Reindex. if this rec doesn't belong to this customer, eof is true- b_code b_code No buyer records on file!" test for end of file End of File! Skipped to record BuyHigh_GotFocus b_high# BuyLow_GotFocus b_low"# BuyPrevious_Click skip back one record if skip error, only allow exit Error on Skip Previous. Try Reindex. b_code No buyer records on file!" test for beginning of file" Beginning of File! Skipped to record BuySave_Click verify something in the field Field cannot be empty" verify unique key if adding Duplicate Key on Add Data passed. Put it away b_code b_cat" b_desc b_low" b_high Update status box Record " appended" Record " saved Update Button Status BuyTypeHelp_Click Aircraft Type Help re-register databasec category catname" Form_Paint if delete request from browse, do it nowT because we must let enhanced controls paint before asking for delete confirmation