I use it for importing large amounts of data where I need to create a temporary unindexed table in a temporary database, import and then add indexes. Much quicker than importing to an indexed table. Yes could use a table 'template' but there have been occasions where it doesn't work due to small changes required 'on the fly' or the import module gives the user the opportunity create or modify their own import profile without me getting involved.
I've also used it during development as a 'script' to create or recreate a test database and can comment out bits of the script which I don't want to run again if doing a partial reset.
Finally I've used it where I need to update a client's BE and but don't have access to it - can just send the client a small .accde and ask them to run it
Could use similar code to create tabledefs instead I guess but that was the way I learned on sql server.
But I don't use it as part of normal user interaction
And in respect of this thread, I've not set defaults so was unaware of the ADO issue
If using currentproject.Connection.execute is ADO, brings some ideas to mind how that might be useful. Will need to find some time to investigate.
Here is an example from my AccessStudio free version
[CODE]/*
usysCounter is a useful routine to generate multi line queries such as when a number of records are required to be generated from a single value
highlight and execute each block of code as required
or remove the block comments to execute all in one pass
*/
/*DROP TABLE usysCounter;--only use if you want to start from scratch*/
/*CREATE TABLE usysCounter ( num long);*/
/*DELETE * FROM usysCount;-- only use if you want to refresh the data */
/*
INSERT INTO usyscounter (num) VALUES (0);
INSERT INTO usyscounter (num) VALUES (1);
INSERT INTO usyscounter (num) VALUES (2);
INSERT INTO usyscounter (num) VALUES (3);
INSERT INTO usyscounter (num) VALUES (4);
INSERT INTO usyscounter (num) VALUES (5);
INSERT INTO usyscounter (num) VALUES (6);
INSERT INTO usyscounter (num) VALUES (7);
INSERT INTO usyscounter (num) VALUES (8);
INSERT INTO usyscounter (num) VALUES (9);
SELECT * FROM usyscounter;--check it has populated as expected*/
/*
to create a query from here (I use usysCount) - enter the name you want in the name box above, highlight the sql code below and click on Save as Query
SELECT CLng([singles].[num]+([tens].[num]*10)+([hundreds].[num]*100)+([thousands].[num]*1000)) AS [Counter]
FROM usysCounter AS singles, usysCounter AS tens, usysCounter AS hundreds, usysCounter AS thousands;
*/
/*This example could be used to create a complete database - in a new db, add in Access Studio, then execute the code - as development continues, highlight relevant code to rebuild*/[/CODE]