473,382 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Getting run-time 3009 error on "DoCmd.TransferDatabase acExport" statement

167 100+
I am using MS2007 on windows XP. I support an access application which has a 'main menu' (form) and on this form there is a button 'Exit Database'. In the 'on click' event code for the 'Exit Database' button the following is code is executed to copy a table to another database:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferDatabase acExport, "Microsoft Access", "C:\Inv\ITH.mdb", acTable, "HWI", "HWI"
  2.  
This produces the run-time 3009 error which states "You tried to lock table "HWI" while opening it, but the table cannot be locked because it is currently in use."

There is no code on this 'form_load' event on this form that references this table, there is no recordsource defined on the data property for this form. I see no where that this table is referenced or open at this point.

I have opened this application without selecting any other buttons on the main menu form and click on the 'exit database' button to try to make sure I have not opened the referenced table. I still get the error.

The users informed me that this has been happening since we upgraded to MS2007, they just have not mentioned it.
I don't understand why access thinks there the table is in use. Not sure what in 2007 could have made this not work. We were on MS2000 prior and this worked fine.

I am out of ideas. Any suggestions would be greatly appreciated!!
May 19 '11 #1

✓ answered by NeoPa

ncsthbell:
I just love these inherited databases!
They are always the most fun huh. When you manage to determine what someone has been thinking behind some of the weird things they do. I actually find myself having the same thoughts about some of my own older databases sometimes too. That's frightening!

4 4392
NeoPa
32,556 Expert Mod 16PB
Are any of the references to tables in the active database?

What are the Lock settings in your installation of Access?

PS. For ease of understanding the question I'm reposting your code more clearly :
Expand|Select|Wrap|Line Numbers
  1. Call DoCmd.TransferDatabase(TransferType:=acExport, _
  2.                             DatabaseType:="Microsoft Access", _
  3.                             DatabaseName:="C:\Inv\ITH.mdb", _
  4.                             ObjectType:=acTable, _
  5.                             Source:="HWI", _
  6.                             Destination:="HWI")
May 19 '11 #2
ncsthbell
167 100+
There are references to the tables in the active database, however, when I open the main menu and click on the exit button, the table has not been opened.
I will have to check with our tech support group to find out what the lock options are set to on the installation.
I found out that the reason the person that wrote this is doing these exports is to update a 'read' only version of this same database. So, what they have is the same database duplicated in another location and when a user goes into the 'write' version and make changes, upon exiting, the tables are exported to the 'read' version. Now I am thinking this is absurd! There should not be 2 versions just for read and write. I am thinking to scrap worrying about getting these exports to work and to build a user table. I can check when they login and determine how to set the form properties for the 'read only' users. This would eliminate having 2 copies of the same database just for read or write access. I just love these inherited databases!
May 20 '11 #3
NeoPa
32,556 Expert Mod 16PB
ncsthbell:
I just love these inherited databases!
They are always the most fun huh. When you manage to determine what someone has been thinking behind some of the weird things they do. I actually find myself having the same thoughts about some of my own older databases sometimes too. That's frightening!
May 20 '11 #4
ncsthbell
167 100+
Nice to know I am not the only one that deals with these older databases. In our case, we had users that were allowed to create any access database they wanted. Then, with MS2007, they were given 'runtime' only access. Given that, the IT dept. inherited all of these databases to support. It has been a nightmare! Slowly, one by one I am figuring them out!
May 20 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jack | last post by:
Hi, I got a asp page where I am getting the following error. (Line 126 is actually the RS.open statement.) ERROR MESSAGE Technical Information (for support personnel) Error Type:
2
by: Alicia | last post by:
Does anyone know why I am getting a "Syntax error in Create Table statement". I am using Microsoft Access SQL View to enter it. Any other problems I may run into? CREATE TABLE weeks (...
0
by: compuglobalhypermeganetz0r | last post by:
I am having trouble getting an adapter to update my access database, it gives the error Syntax error in INSERT INTO statement. for Line 98: Adapter.Update(WineDS, "tblWines") Below is my...
6
by: Teep | last post by:
Below is my code for dropdownlist that is populated from a SQL table. After a selection from the ddl, a datagrid is suppose to come up pertaining to the information selected, but I keep getting a...
1
by: solomon_13000 | last post by:
connection.asp: <% Sub RunQueryString (pSQL,parms) on error resume next Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &...
10
by: Rahul Babbar | last post by:
Hi, I am getting the following error, while executing the simple insert script on a few tables. INSERT INTO <table_name>(<col1>) VALUES (1); DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884,...
3
by: Indy | last post by:
Hi, I am new to VB and have some previous programming experiences. Curently working as an IT support person and trying to write a VB 6 script to access apos database and get one of the table's...
15
denny1824
by: denny1824 | last post by:
I have a working website. I copied all the files to a new folder in inetpub/wwwroot and then set that folder as a Virtual Directory in IIS. I try going to that site from the new folder and i am...
0
by: ppletkov | last post by:
Hi - I apologize if this is a simple question in advance :-) (hopefully it is so its quickly resolved!) i'm trying to figure out why i keep getting an error (Compile Error : expected function or...
1
by: Lauren Dobson | last post by:
This database was working days ago, outputting a vocabulary list into a word document. Any idea why I'm getting runtime error 3010? I just switched from Windows XP to Windows 7 but I'm still using...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.