Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problems
Miscellaneous
Thread ID:
00587226
Message ID:
00587226
Views:
51
Hi everybody,

I think, it's one of the bad day for me... Here is the problem, which I currently can not figure out a solution:

As soon as user moves focus to another field on the screen, I need to update another table with the minimum date for the specific town. In my "parent" table could be several records for one town. In the "child" table, there is only one record for this week for this town. I don't want to use select statement, since data are not saved yet.

Together we wrote this statement, which works in Init of the form, but would not work in the middle of the process:
if seek(rcode+town+ExtrYear+ExtrWeek,"FilingDate","rcTownWeek")
               replace FilingDate.record_fm with ;
                   iif(!empty(FilingDate.record_fm) and BatchCntrl.record_fm<=FilingDate.record_fm, BatchCntrl.record_fm, FilingDate.record_fm), ;
                    FilingDate.record_to with ;
                    iif(!empty(FilingDate.record_to) and BatchCntrl.record_to>=FilingDate.record_to, BatchCntrl.record_to, FilingDate.record_to), ; 
                    FilingDate.landct_fm with ;
                   iif(!empty(FilingDate.LandCt_fm) and BatchCntrl.LandCt_fm<FilingDate.LandCt_fm, BatchCntrl.LandCt_fm, FilingDate.record_fm), ;
                    FilingDate.landct_to with ;
                    iif(!empty(FilingDate.LandCt_to) and BatchCntrl.LandCt_to>=FilingDate.LandCt_to, BatchCntrl.LandCt_to, FilingDate.LandCt_to), ;                     
                    FilingDate.CalMnth with iif(!empty(BatchCntrl.CalMnth), BatchCntrl.CalMnth, FilingDate.CalMnth) ;
                    FilingDate.Notes with FilingDate.Notes+BatchCntrl.Notes additive, ;
                    FilingDate.MDFlag with iif(BatchCntrl.MDFlag=.t.,BatchCntrl.MDFlag, FilingDate.MDFlag) ;
                    in FilingDate
Can this be done without local varialbles (preferebly the best method)?
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform