Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update a field in a record
Message
 
À
18/07/2000 05:55:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00393695
Message ID:
00393697
Vues:
14
Do you mean that in table pay, you have several records replacing some fields with the same value?

To assist further, better give some info of the table structure.

>Help,
>
>In my code below I replace my table fields with form.text.values. This replaces ALL the records
>that meet that condition with form text values. My problem is, that in some cases I only want to
>replace one record. Example: chkamt (Check Amount), misc_amt (Misc. Amount) and
>gen_misc (Gen Misc. Amount). I use these fields to calculate sums in a report, and if
>they are posted in every record, it gives me an incorrect Sum Value. What I would
>like to be able to do, is post to ONE record for the above fields.
>
>Can I get any help?
>
>John
>
>
>SET DEFAULT TO \EFG
> SET SAFETY OFF
> SET TALK OFF
> SET ECHO OFF
> SET DELETED ON
>
> *** USE pay IN 0
> SCAN FOR ins_co_nam = "A U L" AND group_code = 'A01'
>
> REPLACE paiddate WITH THISFORM.TEXT1.VALUE,;
> fromdate WITH THISFORM.TEXT2.VALUE,;
> todate WITH THISFORM.TEXT3.VALUE,;
> chknumb with THISFORM.TEXT5.VALUE,;
> chkamt with THISFORM.TEXT4.VALUE,; &&& NEEDS SINGLE POSTING
> misc_amt WITH THISFORM.TEXT6.VALUE,; &&& NEEDS SINGLE POSTING
> gen_misc WITH THISFORM.TEXT7.VALUE,; &&& NEEDS SINGLE POSTING
> servfee WITH .69
>
>
>
> REPLACE balance WITH amt_pre - servfee,;
> duecompany WITH balance posted with "P"
>
> *** REPLACE servfee WITH 0, percent WITH 0
>
> ENDSCAN
>
> SELECT * FROM test, pay WHERE test.ss_numb = pay.ssnumber AND pay.ins_co_nam;
> = "A U L" AND pay.group_code = "A01" and AMT_PRE > 1 INTO Cursor;
> CuReport ORDER BY test.last_name
>
> IF _TALLY > 0
>
> *BROWSE
> REPORT FORM payment3b PREVIEW
>
> inResponse = MESSAGEBOX("DO YOU WANT TO POST THIS DATA FOR A01/AUL TO HISTORY?",36,"E.F.G. POSTING OPTIONS!")
>
> IF InResponse = 6
>
> ***LOCAL loProgBar
> SELECT pay
> ***loProgBar=ProgBar()
>
> SCAN FOR GROUP_CODE = "A01" .AND. PAIDDATE = THISFORM.TEXT1.VALUE .AND. INS_CO_NAM = "A U L"
>
> *** loProgBar.npercent=RECNO()/RECCOUNT()*100
> SCATTER MEMVAR MEMO
> INSERT INTO hist FROM MEMVAR
>
> ENDSCAN
> MESSAGEBOX("DATA FOR A01/AUL HAS BEEN POSTED TO HISTORY.","E.F.G." )
> ENDIF
> USE IN PAY
> ELSE
> MESSAGEBOX("FOUND NO RECORDS THAT MATCH YOUR REQUEST")
> ENDIF
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform