Solved

Copying a record and paste it using the same table

Posted on 2000-02-15
2
124 Views
Last Modified: 2010-04-04
I'm working on an invoicing system on Delphi5.
the invoice consist of mastertable and detailtable according to the law i can't delete an invoice.But deleting an invoice it means that i insert the same invoice under another invoice number. for example if i have an invoice with invoice nr. 5 if i delete it. it will remain under number 5 and it will take the invoice number 6 with negative amount so when i do vat statement they can see both one with positive amount and the other with negative one.
0
Comment
Question by:sivatagiherceg
2 Comments
 
LVL 6

Expert Comment

by:Jaymol
ID: 2522902
There's no question there mate!

John.
0
 
LVL 17

Accepted Solution

by:
geobul earned 10 total points
ID: 2523026
Hi,

Read values from current record like this:

FirstField := Table1.FieldByName('First').AsString;
.....

and then add a new record:

Table1.AppendRecord([FirstField,SecondField...]);

Note that the new record becomes current.

Regards, Geo
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question