Wednesday, April 16, 2014

VBA Untuk Menyalin (Copy) Table Ke Database (.MDB) Lain

www.AstroDigi.comAstroDigi.com | Rabu, 16 Apr 2014 | Kalau pada artikel sebelumnya saya membahas mengenai cara menghapus record (isi tabel) dan juga cara menghapus tabel, maka pada artikel kali ini saya akan membahas mengenai cara menyalin (=meng-copy) tabel dengan perintah VBA.

Saya mulai dengan VBA untuk meng-copy tabel pada database sendiri yaitu:
'-------------------------------
Dim perintahSQL As String

perintahSQL = "SELECT tabelSumber.* INTO tabelBaru FROM tabelSumber"
DoCmd.SetWarnings False
DoCmd.RunSQL perintahSQL
DoCmd.SetWarnings True
'--------------------------------

Berikutnya adalah cara untuk meng-copy tabel ke DATABASE LAIN (file .MDB lain):
'-------------------------------
Dim perintahSQL As String

perintahSQL = SELECT tabelSumber.* INTO tabelBaru IN 'C:\namaDirektori\namaDatabase.mdb' FROM tabelSumber
DoCmd.SetWarnings False
DoCmd.RunSQL perintahSQL
DoCmd.SetWarnings True
'--------------------------------

Peng-copy-an tabel ini bisa dimanfaatkan untuk melakukan backup record dari suatu tabel ke database lain. atau bisa juga digunakan untuk memindahkan data ke database lain.

Selamat mencoba . . . have a nice day :-)

 www.AstroDigi.com (Nino Guevara Ruwano)

Comments :

14 comments to “VBA Untuk Menyalin (Copy) Table Ke Database (.MDB) Lain”

hollister, north face outlet, michael kors, montre pas cher, nike air max, beats by dre, rolex watches, soccer shoes, ugg boots, nike free, burberry, hermes, ghd, vans, herve leger, ferragamo shoes, yoga pants, mulberry, reebok outlet, supra shoes, oakley pas cher, lancel, abercrombie and fitch, karen millen, louis vuitton, asics, jimmy choo, new balance shoes, converse shoes, juicy couture outlet, mcm handbags, marc jacobs, hogan, chi flat iron, nfl jerseys, p90x, ralph lauren, birkin bag, valentino, timberland, air max, louis vuitton, lululemon, soccer jerseys, bottega, ray ban pas cher, insanity, celine handbags, wedding dresses, mont blanc

oakleyses said...
on 

tiffany and co, oakley sunglasses, nike air max, michael kors outlet, louboutin, air max, coach factory, true religion outlet, michael kors, polo ralph lauren, kate spade outlet, true religion, coach factory outlet, prada handbags, nike shoes, oakley sunglasses, gucci outlet, tory burch outlet, air max, ray ban sunglasses, louis vuitton, oakley sunglasses, air jordan, nike free, louis vuitton outlet online, oakley sunglasses, coach outlet, louis vuitton handbags, coach outlet store, chanel handbags, michael kors, ralph lauren, true religion jeans, coach purses, longchamp outlet, michael kors outlet, ray ban sunglasses, polo ralph lauren outlet, louboutin, burberry outlet online, ray ban, oakley sunglasses, nike air max, nike free, toms shoes, burberry outlet online, prada outlet, jordan shoes, longchamp

oakleyses said...
on 

true religion outlet, mulberry, lacoste pas cher, true religion jeans, nike air max, new balance pas cher, abercrombie and fitch, lululemon, hermes, nike blazer, longchamp pas cher, air force, vans pas cher, michael kors, nike free run uk, north face, sac guess, nike air max, air jordan pas cher, burberry, converse pas cher, north face, louboutin pas cher, nike air max, nike free, vanessa bruno, ralph lauren pas cher, sac longchamp, michael kors, ralph lauren uk, ray ban uk, air max, hollister, oakley pas cher, michael kors, hogan, tn pas cher, hollister pas cher, ray ban pas cher, nike roshe run, true religion jeans, timberland

Unknown said...
on 

wedding dresses, soccer jerseys, nike roshe, abercrombie and fitch, iphone 6 cases, ferragamo shoes, reebok shoes, soccer shoes, ghd, asics running shoes, nike huarache, lululemon, vans shoes, instyler, nike roshe, oakley, insanity workout, p90x workout, mcm handbags, north face outlet, beats by dre, celine handbags, bottega veneta, baseball bats, north face outlet, longchamp, giuseppe zanotti, hollister, valentino shoes, new balance, nfl jerseys, hollister, jimmy choo shoes, babyliss, herve leger, mac cosmetics, birkin bag, timberland boots, chi flat iron, nike trainers, mont blanc, nike air max

Unknown said...
on 

marc jacobs
nike foamposite
vans shoes
calvin klein outlet
ralph lauren outlet
michael kors outlet online
swarovski crystal
ferragamo outlet
cheap nike shoes
michael kors handbags sale
oakley,occhiali oakley,oakley italia,oakley occhiali,oakley sunglasses
moncler outlet store
the north face outlet
michael kors factory online
ralph lauren uk
nike air max
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
longchamp outlet
michael kors wallet sale
michael kors outlet
mm1203

mmjiaxin said...
on 

fangyanting20161018
hollister sale
michael kors wallet
canada goose outlet
nike free running
nike trainers
mulberry sale
polo ralph lauren
michael kors outlet
tory burch outlet

fangyaoting said...
on 

ed hardy uk
michael kors uk
michael kors handbags
cheap nba jerseys
michael kors handbags wholesale
nike store uk
abercrombie and fitch kids
nike blazer
rolex replica watches
cheap ray ban sunglasses

raybanoutlet001 said...
on 

kate spade
michael kors outlet online
tory burch sale
birkenstock sale
ysl outlet store
cheap oakley sunglasses
pandora charms sale clearanc
uggs
canada goose parka
polo ralph lauren outlet
20161114yuanyuan

John said...
on 

coach outlet
louis vuitton outlet stores
coach outlet online
nike air force 1
toms outlet
burberry outlet
louis vuitton online
longchamp handbag
kobe shoes
ralph lauren
chanyuan2017.02.20

Unknown said...
on 

thomas sabo
louis vuitton neverfull
michael kors handbags
nfl jerseys wholesale
cheap oakley sunglasses
tiffany jewelry
michael kors outlet
mulberry handbags
toms shoes
ugg outlet
chanyuan2017.02.20

Unknown said...
on 

20170320 junda
polo ralph lauren
christian louboutin outlet
ugg outlet
swarovski crystal
oakley sunglasses
louis vuitton outlet
coach outlet clearance
nike outlet
coach outlet online coach factory outlet
cheap ray ban sunglasses

Unknown said...
on 

new balance outlet
michael kors handbags
nike air huarache
ravens jerseys
bears jerseys
dolce and gabbana
replica rolex
browns jerseys
cheap jordans
michael kors outlet

Unknown said...
on 

fitflops sale clearance
michael kors outlet online
celine outlet store
nmd adidas
oakley sunglasses
cheap ray bans
christian louboutin sale
louis vuitton outlet online
ed hardy clothing
michael kors handbags
20170324huazhen

Unknown said...
on 

coach outlet store online
true religion outlet
adidas shoes
coach outlet store online
swarovski outlet
coach outlet clearance
nike blazer pas cher
coach factory outlet
jordan shoes
swarovski crystal
20170524ck

Unknown said...
on 

Post a Comment