Re: Error 3011

Tech-Archive recommends: Fix windows errors by optimizing your registry



Any chance someone has your Production copy open when you try to export
forms to it? Access (since 97) doesn't allow design changes unless the file
is open exclusively, so that could be preventing TransferDatabase from
working. (This is just a guess...)

If all else fails, you might try turning the process around and see if it
works better: import forms from Development to Production.

HTH,


"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BF3D23A4-A47A-4C2C-A4C7-EB546C4922C4@xxxxxxxxxxxxxxxx
Thanks, BW. I have tried various things towards this end: I used the
absolute path to the network drive ("\\Public\Data\etc"), and I've tried
deleting the forms before I send them (in fact, sending them to a fresh
database instead). No soap. :-(

You are correct, BTW, the double-dot was a typo!



"BeWyched" wrote:

Sorry Rob - my info. isn't quite correct - forms can be overwritten but
only
if the destination database isn't open. If it is open then the coding
will
throw an error.

BW


"BeWyched" wrote:

Hi Rob

Your code is perfectly OK (other than a double '..' in
CurrentProject..AllForms which I assume is a typo - it must be a single
.) -
I've copied it into my PC and it works without any errors.

The only explanations I can think of are:

1.That the path to the production database is incorrect or, perhaps,
your
local machine isn't mapped to the 'X' drive.
2. The forms already exist in the destination database - I believe that
the
TransferDatabase method will throw an error if a form with the same
name
already exists in the destination. If so, then you could try
deleting/renaming the existing destination forms and see if it works.
If so,
write code to delete the forms prior to the transfer.

Good luck.

BW




"George Nicholson" wrote:

Not sure, but you might try changing your declaration of frm from
AccessObject to Form. That might make it more palatable to the
ObjectType
(i.e., acForm) argument.

HTH,

"Rob" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E0061D26-9DB9-4D2E-8852-C2FA0437CFD3@xxxxxxxxxxxxxxxx
I posted this question a week or so ago and got no response. I hope
the
repost doesn't bother anyone...

We have an Access 2003 db on a shared drive in our network, and I
have a
development copy on my own system. I'd like to write a bit of code
to
export
all the forms on the development copy to the production copy. Thus:

Sub ExportForms()

Dim frm as AccessObject

For Each frm in CurrentProject..AllForms
DoCmd.TransferDatabase TransferType:= acExport, _
DatabaseType:= "Microsoft
Access", _
DatabaseName:=
"X:\mypath\myDB.mdb", _
ObjectType:= acForm, _
Source:= frm.Name, _
Destination:= frm.Name
Next frm

End Sub

However, when I run the code it returns an error 3011, telling me
that the
Microsoft Jet Database could not find the object "Databases". I'm
not sure
what this means, since I am not referring to any object called
"Databases".
Any ideas?

Thanks!





.



Relevant Pages

  • Re: Error 3011
    ... Is the Destination database the same version as the source. ... That might make it more palatable to the ObjectType ... For Each frm in CurrentProject..AllForms ...
    (microsoft.public.access.modulesdaovba)
  • Re: Error 3011
    ... The forms already exist in the destination database - I believe that the ... That might make it more palatable to the ObjectType ... For Each frm in CurrentProject..AllForms ...
    (microsoft.public.access.modulesdaovba)
  • Re: Error 3011
    ... deleting the forms before I send them (in fact, ... if the destination database isn't open. ... The forms already exist in the destination database - I believe that the ... That might make it more palatable to the ObjectType ...
    (microsoft.public.access.modulesdaovba)
  • Re: Error 3011
    ... 1.That the path to the production database is incorrect or, perhaps, your ... The forms already exist in the destination database - I believe that the ... That might make it more palatable to the ObjectType ... For Each frm in CurrentProject..AllForms ...
    (microsoft.public.access.modulesdaovba)
  • Oracle DBA, Denver, Branta Group Contract
    ... Oracle DBA, Denver, Branta Group Contract ... sites focusing on database performance and availability. ... first and second tier resolution of production issues. ... procedures supporting a mission critical 24x7 production environment ...
    (comp.databases.oracle.marketplace)