Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 22nd, 2004, 02:57 PM
Authorized User
 
Join Date: Feb 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chacquard
Default problem caused by data transfer

Hi,

I sometimes need to copy some data to create new inventory (I have a command button for that event). When I use it, I get a error message when I want to use the paste/append commands. The message states that the "paste/append function is not available at this time". After several months, we were able to identify when the problem occurs:

I have a database that grows fast and I need to transfer some of the information regularly to another database. I use two sets of linked tables: 1 for the current data and 1 for the "historical" data. Using the "openqry" command, I copy and transfer specific data from 4 different current tables to the according tables in the history database and I delete the current data when the copy is done. After the transfer is done, when I go back to the inventory and want to add new inventory I get the "error message" again. Actually this is the only time when it happens: after data transfers!

Does anyone know if I need to clear the clipboard or something ? Or do you know of a better way to transfer the data from one database to the other.

Thank you!


 
Old January 8th, 2005, 10:59 AM
Authorized User
 
Join Date: Jul 2004
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default

I too have this problem cropping up occasionally. After many frustrating attempts to resolve it we realised that it is not simply one problem. The things to check are (not in any particular order)

- network speed. If your network is trying to update remote(historic) tables using copy/paste it will not 'release' your master database until the append/paste is complete. Try putting DoEvents in your code. This will halt all processing until the OS/Network has caught up.
- database size. Check this regularly during a test run[use Filesystem.FileLen("database full path and name") or Filesystem.FileLen(CurrentDb.Name) for the master to display the size on a form]. You will be surprised how big your source and target databases become. We found that by compacting the master after a copy/paste, the errors did not appear. Unfortunately this can only be done by code if your master and remote databases are controlled through a 'switchboard' database and each is opened up in a separate Access window - not difficult, but not elegant either.
- your do not specifically say how you connect to the remote (historic)database but we found the problems (apart from database size) do not appear if you simply link the remote database tables to your master and use an Append query to transfer the data.

No techie solutions, I'm afraid, but I am confident that one of the above is causing your problem, If it is not please let us know.

Alan T






Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Transfer Problem in C# akumarp2p C# 0 December 5th, 2006 11:51 AM
Data Transfer problem in C# akumarp2p C# 0 December 5th, 2006 10:38 AM
Circular reference caused by alias "May" jackpeters55 Access VBA 0 December 22nd, 2004 12:42 PM
problem caused by single quote isheikh BOOK: Beginning ASP 3.0 1 April 16th, 2004 02:52 AM
Data transfer problem beelzebubs Access VBA 5 January 9th, 2004 08:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.