Well, here I am in what I lovingly call the looney-bin, better known as the Access forum.
Anyway, for some reason, known only to the government, they didn’t like my data in a spreadsheet, had to have it in a database. “The import code doesn’t always work, please fix it Sam!” Actually, it looks like it does work, except the import (via DoCmd.TransferSpreadsheet) takes about 15 minutes, which is not a problem because you have a progress bar. But (finally the question) the DoCmd.Close acQuery takes 20 minutes with no feed-back During this time Access is using 80-90% of my dual-processor, each 2.2 Ghz, 1GB ram machine! Isn’t this a little excessive? Which part of close does it not understand? Yes, there are 8,000 records and it seems to run fine with smaller imports, so I’m going to try to copy the big sheet to a bunch of smaller worksheets and put the import into a loop. Might work. TIA –Sam
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Speed-up DoCmd.Close (97)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Speed-up DoCmd.Close (97)
- This topic has 12 replies, 4 voices, and was last updated 22 years, 8 months ago.
AuthorTopicWSSammyB
AskWoody LoungerOctober 10, 2002 at 8:26 pm #377826Viewing 1 reply threadAuthorReplies-
WSpatt
AskWoody LoungerOctober 10, 2002 at 8:37 pm #623314How many columns does the spreadsheet have?
If it has only 8000 records it should import at the speed of light (there is some conjecture of just how fast that is !!).
If the spreadsheet has no sensitive data, post it and I will try it on my 300 machine (it’s from the dinosaur era).
Pat -
WSSammyB
AskWoody LoungerOctober 10, 2002 at 9:20 pm #623353 -
WBell
AskWoody_MVPOctober 11, 2002 at 9:51 am #623451 -
WSSammyB
AskWoody LoungerOctober 11, 2002 at 12:56 pm #623482Great idea, Wendell! Unfortunately, when I tried doing this manually, Access choked with “Too large a record.” Curious, what kind of monster have I been given? Using Word, turns out those 8K records by 24 columns have a whopping 8.5 million characters and the largest record has 4461 characters. Guess I’ll have to take back some of the Bill-bashing, but not all.
-
WBell
AskWoody_MVPOctober 11, 2002 at 5:55 pm #623587Good grief – you have some records that are spanning pages in Access97. That causes all sorts of performance degradation, or else you have to use memo fields which does the same thing. After all, I sure it took Leo Tolstoy more than 15 minutes.
-
WSSammyB
AskWoody LoungerOctober 11, 2002 at 6:18 pm #623620, and guess what happened to all that data:
DoCmd.TransferSpreadsheet… into a temporary table
Get User’s permission to update the real table
OpenQuery “Imports” to retrieve the data that needs to be added
RunCommand acCmdSelectAllRecords
RunCommand acCmdCopy which puts a pointer to the data on the clipboard
OpenTable “Entries”
SetWarnings False
RunCommand acCmdPasteAppend
Close acTables, “Entries”
Close acQuery “Imports” which copies everything to the clipboard since Warnings were off
SetWarnings True but too lateSo, I cleared the clipboard before closing the query and thanks to you-all, I’m the hero.
-
WBell
AskWoody_MVPOctober 11, 2002 at 9:01 pm #623696I suspect you might be an even greater hero if you used an append query instead of doing a paste append. Native mode SQL tends to run much faster than commands, and you don’t need to mess with the clipboard at all. BTW, you may be
if you run this process a number of times – the file size limit for Access97 is 1GB. You will also need to compact and repair regularly as the database will grow like topsy if you don’t, and then you’ll discover it’s too big to compact. Also, are you deleting data after a period of time – that would help greatly as well. Glad things got to working for you – now you just have to worry about the
s abducting things tomorrow.
-
WSSammyB
AskWoody LoungerOctober 12, 2002 at 3:18 pm #623797Boy, now if I just knew what you said
But, I’ll figure it out. First, I need to get out the bright lights and rubber hose and get someone to explain the big picture to me. Somehow, using very bizzare SQL (ie JOINS
), after the import the code figures out from whether to add, delete, and/or modify records. Need to understand and hopefully simplify that, then figure out the append query.
You’re also correct on the compact & repair, they have created a monster, but this is just a temporary prototype, until the customer can afford and get Oracle. But, someone needs to do some design work. As Charlotte said, mimicking the manual process is not usually the best way, but this was just a low-budget effort and unfortunately for now, I’ve run out of money,
but it will raise its ugly head again. Hopefully by then, I will have passed the Outlook MOUS test, so I can start learning Access. Thanks, again. –Sam
-
WBell
AskWoody_MVPOctober 12, 2002 at 4:19 pm #623803Actually you’ll find the query route much simpler than the hoops you’ve had to jump through to get this to work as it is. And no need to understand all that “JOINS” stuff – there shouldn’t be any in what you need to do. Just create a select query using the query grid and then tell it you want to do an append. All that should happen after the users figure out any editing in the temp table. Of course you could just do the editing in the permanent table, but that might make the users a bit nervous. Now about that Outlook stuff – if you ever pass the MOUS test you’ll be so
that Access will look plain simple.
As to Oracle, why not consider a small version of SQL Server? It can grow to huge sizes, and doesn’t have quite the same overhead as Oracle. In fact, if you only have a single user, the developer version would be sufficient. Otherwise your best bet might be SBS – it includes SQL Server and 5 CALs for about the same price as the Standard SQL Server version.
-
WScharlotte
AskWoody LoungerOctober 12, 2002 at 2:46 am #623754Sam,
I’m with Wendell on this. That is a truly ugly way to go about it. Mimicking a manual process may work in Word or Excel but in Access it will bite you! Turn your select query into an append query and dispense with the rest. If you alias the temporary table or use the same table name for every import, you can build an append query that you can reuse each time.
-
-
-
-
-
WScharlotte
AskWoody Lounger -
WSSammyB
AskWoody LoungerOctober 11, 2002 at 12:48 pm #623479> Why are you using DoCmd.Close on a query
I knew you would make me do unreasonable things like understand the code! The code is cryptic, at least to me, but I’m working on it and trying to create a simple program with the problem, so bear with me. I’ll try to have an answer today. Thanks! –Sam
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
1 hour, 14 minutes ago -
New PC transfer program recommendations?
by
DaveBoston
14 minutes ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
5 hours, 18 minutes ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
5 hours, 20 minutes ago -
Best tools for upgrading a Windows 10 to an 11
by
Susan Bradley
37 minutes ago -
The end of Windows 10 is approaching, consider Linux and LibreOffice
by
Alex5723
1 hour, 19 minutes ago -
Extended Windows Built-in Disk Cleanup Utility
by
bbearren
3 hours, 29 minutes ago -
Win 11 24H2 June 2025 Update breaks WIFI
by
dportenlanger
1 day ago -
Update from WinPro 10 v. 1511 on T460p?
by
CatoRenasci
13 hours, 51 minutes ago -
System Restore and Updates Paused
by
veteran
1 day, 2 hours ago -
Windows 10/11 clock app
by
Kathy Stevens
13 hours, 55 minutes ago -
Turn off right-click draw
by
Charles Billow
1 day, 6 hours ago -
Introducing ChromeOS M137 to The Stable Channel
by
Alex5723
1 day, 9 hours ago -
Brian Wilson (The Beach Boys) R.I.P
by
Alex5723
3 hours, 27 minutes ago -
Master patch listing for June 10, 2025
by
Susan Bradley
1 day, 11 hours ago -
Suggestions for New All in One Printer and a Photo Printer Windows 10
by
Win7and10
14 hours, 4 minutes ago -
Purchasing New Printer. Uninstall old Printer Software First?
by
Win7and10
1 day, 17 hours ago -
KB5060842 Issue (Minor)
by
AC641
5 hours, 18 minutes ago -
EchoLeak : Zero Click M365 Copilot leak sensitive information
by
Alex5723
2 days ago -
24H2 may not be offered June updates
by
Susan Bradley
16 hours, 54 minutes ago -
Acronis : Tracking Chaos RAT’s evolution (Windows, Linux)
by
Alex5723
2 days, 12 hours ago -
June 2025 updates are out
by
Susan Bradley
7 minutes ago -
Mozilla shutting Deep Fake Detector
by
Alex5723
3 days, 3 hours ago -
Windows-Maintenance-Tool (.bat)
by
Alex5723
2 days, 13 hours ago -
Windows 11 Insider Preview build 26200.5641 released to DEV
by
joep517
3 days, 6 hours ago -
Windows 11 Insider Preview build 26120.4250 (24H2) released to BETA
by
joep517
3 days, 6 hours ago -
Install Office 365 Outlook classic on new Win11 machine
by
WSrcull999
3 days, 6 hours ago -
win 10 to win 11 with cpu/mb replacement
by
aquatarkus
2 days, 22 hours ago -
re-install Windows Security
by
CWBillow
3 days, 9 hours ago -
WWDC 2025 Recap: All of Apple’s NEW Features in 10 Minutes!
by
Alex5723
3 days, 13 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.