Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Add code 1

Status
Not open for further replies.

bobsmallwood

Programmer
Aug 9, 2001
38
US
Can someone tell me the code to put on a pushbutton that will add the records of a table into another table? Thanks.
 
Bob,

In version 9 code similar to the following would normally suffice.
;==========================================================
var
ansTbl Table
destTbl String
endvar

;substitute your source and destination tables below

destTbl = "your_destination.db"
ansTbl.attach("your_source.db")

if isTable(destTbl) then
if NOT ansTbl.add(destTbl) then
errorShow()
endIf
else
msgStop("Error", "Can't find " + destTbl + ".")
endIf
;==========================================================

I hope that this helps.

Regards

Bystander
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top