Solved

Copying a record and paste it using the same table

Posted on 2000-02-15
2
127 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi Form ownership 4 160
drawing animated level bar based on numbers 3 122
Microsoft Access 97 and Delphi XE2 9 85
FMX TEdit KeyUp handler detecting  "enter" key 4 64
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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