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
-
Lost sound after the upgrade to 24H2?
by
Susan Bradley
1 hour, 18 minutes ago -
How to move 10GB of data in C:\ProgramData\Package Cache ?
by
Alex5723
2 hours, 13 minutes ago -
Plugged in 24-7
by
CWBillow
9 hours, 35 minutes ago -
Netflix, Apple, BofA websites hijacked with fake help-desk numbers
by
Nibbled To Death By Ducks
14 hours, 27 minutes ago -
Have Copilot there but not taking over the screen in Word
by
CWBillow
11 hours, 36 minutes ago -
Windows 11 blocks Chrome 137.0.7151.68, 137.0.7151.69
by
Alex5723
2 days, 5 hours ago -
Are Macs immune?
by
Susan Bradley
3 hours, 39 minutes ago -
HP Envy and the Function keys
by
CWBillow
1 day, 13 hours ago -
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
2 days, 16 hours ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
2 days, 17 hours ago -
Unable to update to version 22h2
by
04om
1 hour, 22 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
3 days ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
3 days ago -
Very Quarrelsome Taskbar!
by
CWBillow
2 days, 10 hours ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
3 days, 13 hours ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
3 days, 2 hours ago -
Is your battery draining?
by
Susan Bradley
1 hour, 59 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
2 hours ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
3 days, 17 hours ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
1 day, 3 hours ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
3 days, 1 hour ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
2 days, 18 hours ago -
National scam day
by
Susan Bradley
2 days ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
2 days, 21 hours ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
4 days, 18 hours ago -
Tools to support internet discussions
by
Kathy Stevens
3 days, 7 hours ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
4 days, 9 hours ago -
AI is good sometimes
by
Susan Bradley
5 days, 1 hour ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
4 days, 15 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
6 days, 2 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.