Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending a new record
Message
From
18/08/2000 10:01:12
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Appending a new record
Miscellaneous
Thread ID:
00406633
Message ID:
00406633
Views:
42
Help,

>I'm trying to append a table after I geather information from a screen form and befor posting.
>What I do is geather the information from the screen via text.values and replace the fields of
>one table with them. I do my calcs. in the replace meathord.

>My command button code is the following:

>set default to \efg
>set talk off
>set deleted on

>use pay in 0

>SCAN FOR ins_co_nam = " INSURANCE CO NAME" AND GROUP_CODE = "A01"

>REPLACE PAIDDATE WITH THISFORM.TEXT1.VALUE,;
>FROMDATE WITH THISFORM.TEXT2.VALUE,;
>TODATE WITH THISFORM.TEXT3.VALUE,;
>SERVFEE WITH 1.00

>REPLACE BALANCE WITH AMT_PRE - SERVFEE,;
>PERCENT WITH BALANCE*.1, DUECOMPANY WITH BALANCE - PERCENT, POSTED WITH "P"

>ENDSCAN
>SELECT * FROM TEST, PAY WHERE TEST.SS_NUMB = PAY.SSNUMBER AND PAY.INS_CO_NAM = "INS1" AND PAY.GROUP_CODE = "A01" AND AMT_PRE > 1;
>INTO CURSOR CuReport ORDER BY TEST.LAST_NAME

IF _TALLY > 0

>REPORT FORM payment3B preview

>inResponse = MESSAGE("DO YOU WANT TO POST DATA ?",36,"INS CO NAME")

>iF InResponse = 6

>SELECT PAY
>SCAN FOR GROUP_CODE = "A01" AND INS_CO_NAM = "INS CO NAME"

>SCATTER MEMVAR MEMO
>INSERT INTO hist(table) from MEMVAR
>ENDSCAN

>MESSAGEBOS("DATA HAS BEEN POSTED")
>ENDIF
>USE IN PAY
>ELSE
>MESSAGEBOX("NO RECORDS FOUND THAT MATCH YOUR REQUEST")
>ENDIF

What I like to be able to do is, before posting my information to the history (hist) table, append a (one) record to misc. table from information
that is also on the screen form thisform.text4.value to misc.field1, thisform.text5.value to misc.field2
and not upset the first part of my code.
Next
Reply
Map
View

Click here to load this message in the networking platform