Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Upon selection of record perform action
Message
From
25/03/1998 08:42:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00086967
Message ID:
00086972
Views:
21
>vfp 3.0 in win 95
>
>I have a browse screen with a combo box and upon selecting a record,
>I need an action to happen, copy to a new record, etc.
>
>What is the best method to use to accomplish this?
>
>Thanks and have a good day!
Rebecca,
Maybe not best, I prefer lostfocus method (more compatible for VFP5 upgrading).
*Lostfocus
if !ValidationOK
    nodefault
    this.setfocus  && First validate and stay in place if not satisfied
    return
endif
do case
 case this.value = case1
 ...
 case this.value = case2  && Copy to new record
   c_Alias = alias()
   * Prepare new data
   select .. from .. where aField = this.value and .t. ;
     into cursor tData    && Create a true cursor
   scatter memvar memo
   use in "tData"         && Close cursor
   select (c_alias)
   m.anyfield = newValue  && Change necessary fields
   insert into myTable from memvar
 otherwise
 ...
endcase
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform