Information générale
Catégorie:
Contrôles ActiveX en VFP
Steve,
In addition to what Igor told, here is the foxpro code example:
oAccess.DoCmd.SetWarnings(.f.) && alerts off
oAccess.DoCmd.RunSQL("INSERT INTO tableB SELECT * from tableA;")
Best Wishes
Yuri
>>>>>>>>>>>>>>>Previous messages below
>I am working on an VFP application that inserts data from VFP tables into an Access2K database. Does anyone know the command to take "tableA" in an Access2K .mbd file and append it to "tableB" in the same .mdb file? The data that is already in "tableB" has to stay intact.
>
>Thanks,
>Steve
Hi Steve,
Below is pure MS Access 2K SQL statement to do the job:
INSERT INTO tblB ( ID, PhoneNumber ) SELECT tblA.ID, A.PhoneNumber FROM tblA;
to execute it you may use VBA code below:
currentdb.execute "INSERT INTO tblB ( ID, PhoneNumber ) SELECT tblA.ID, A.PhoneNumber FROM tblA;"
Hope, I understand your problem correctly.
Igor
Igor Gelin,
Brookline, Massachusetts
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement