Hi Art
No problem! Just construct a CREATE TABLE statement in a string variable and Execute it. Allen Browne has some well thought-out examples here: http://allenbrowne.com/func-DDL.html
Just beware that if you use CurrentDb.Execute, then the table will be created in your front-end. If you want it in a back-end or a temporary database, then you must open that database with the OpenDatabase method, and execute the command there.
Best wishes,
Graham
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Saturday, 9 September 2017 07:15
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Creating a table on a fly
Is there a way to create a table or tables on the fly with vba? I would like to open up my database and click a command button and have it create the tables...
Probably asking a lot but thank you....
Thank You,'
Art Lorenzini
SD
Posted by: "Graham Mandeno" <graham@mandeno.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar