Solved

Copying a record and paste it using the same table

Posted on 2000-02-15
2
122 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
Comment Utility
There's no question there mate!

John.
0
 
LVL 17

Accepted Solution

by:
geobul earned 10 total points
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now