Error (-1524) in Access 2007 (1 Viewer)

cld1220

New member
Local time
Today, 03:14
Joined
Apr 7, 2008
Messages
4
I have a database that dumps data to another database with an append query which is activated by a button on a form. This works fine in Access 2003 but when we load it in Access 2007 and run it it somes up with the error Reserved error (-1524); there is no message for this error.

Any suggestions as what to do?
 

boblarson

Smeghead
Local time
Yesterday, 23:14
Joined
Jan 12, 2001
Messages
32,059
What is the code for the button and what is the SQL for the query?
 

cld1220

New member
Local time
Today, 03:14
Joined
Apr 7, 2008
Messages
4
The SQL and code

Here is the SQL:

INSERT INTO Individuals ( Company_Id, [Contact Number], [Mr/Ms], Initial, [First], [Last], Title, [Email address], [Area Code], [Bus Phone], Ext, [Main Contact] IN 'C:\EF Database\EF Main Dbase.mdb'

SELECT Individuals.Company_Id, Individuals.[Contact Number], Individuals.[Mr/Ms], Individuals.Initial, Individuals.First, Individuals.Last, Individuals.Title, Individuals.[Email address], Individuals.[Area Code], Individuals.[Bus Phone], Individuals.Ext, Individuals.[Main Contact]

FROM Companies LEFT JOIN Individuals ON Companies.ID = Individuals.Company_Id

The code is:

Private Sub CopiesAll_Click()
On Error GoTo Err_CopiesAll_Click

Dim stDocName As String

stDocName = "NS"
DoCmd.RunMacro stDocName

Exit_CopiesAll_Click:
Exit Sub

Err_CopiesAll_Click:
MsgBox Err.Description
Resume Exit_CopiesAll_Click

End Sub
 

cld1220

New member
Local time
Today, 03:14
Joined
Apr 7, 2008
Messages
4
What is the code for the button and what is the SQL for the query?

Here is the SQL:

INSERT INTO Individuals ( Company_Id, [Contact Number], [Mr/Ms], Initial, [First], [Last], Title, [Email address], [Area Code], [Bus Phone], Ext, [Main Contact] IN 'C:\EF Database\EF Main Dbase.mdb'

SELECT Individuals.Company_Id, Individuals.[Contact Number], Individuals.[Mr/Ms], Individuals.Initial, Individuals.First, Individuals.Last, Individuals.Title, Individuals.[Email address], Individuals.[Area Code], Individuals.[Bus Phone], Individuals.Ext, Individuals.[Main Contact]

FROM Companies LEFT JOIN Individuals ON Companies.ID = Individuals.Company_Id

The code is:

Private Sub CopiesAll_Click()
On Error GoTo Err_CopiesAll_Click

Dim stDocName As String

stDocName = "NS"
DoCmd.RunMacro stDocName

Exit_CopiesAll_Click:
Exit Sub

Err_CopiesAll_Click:
MsgBox Err.Description
Resume Exit_CopiesAll_Click

End Sub
 

boblarson

Smeghead
Local time
Yesterday, 23:14
Joined
Jan 12, 2001
Messages
32,059
The problem may be that Access 2007 is a little more secure and you aren't actually accessing the database in a way that it likes. Is that other database in a Trusted Location?

If that doesn't work, you may need to open a DAO recordset to do the work.
 

cld1220

New member
Local time
Today, 03:14
Joined
Apr 7, 2008
Messages
4
Everything is trusted. And even if I try just a straight append query to the other database I still get the error. I even have tried just updating a couple of fields and if any of the fields have a space in them it gives an error that it can't find the field even with the square brackets.

Anyone else having probelems with append queries in 2007?
 

KathyL

Registered User.
Local time
Yesterday, 23:14
Joined
Apr 17, 2009
Messages
48
Yes, I am getting this error for a different situation, and haven't found a solution.
I work in a development environment, and need to frequently manually export forms, queries, and even tables over to a production Access database. The exports were working ok, until I tried exporting a Table, and then I got the "Reserve error (-1524)" message.

I have re-checked to see that both my development and production databases have all databases set up as Trusted databases, but that has not made any difference.

I'm still getting the error, and can not export.

Help!
 

boblarson

Smeghead
Local time
Yesterday, 23:14
Joined
Jan 12, 2001
Messages
32,059
Were all users out of the database you were trying to export to? What was the name of the object you were trying to export?
 

Users who are viewing this thread

Top Bottom