Having troubles with error 7866 .opencurrentdatabase

R

ramon soler

here is the code it opens dab and then give the error 7866 when opoencurrent

dbContab.Close
Set dbContab = OpenDatabase(dirbase & archbase, False, False, ";pwd=" &
clavebd)
On Error GoTo 0
'error 7866 exclusive mode which is not true when opendatabase why
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase dirbase & archbase, , clavebd
For Each tdf In dbContab.TableDefs
If Not (tdf.Attributes And dbSystemObject) <> 0 Then
If tdf.Name = "prefinancieros" Then
On Error GoTo 0
SqlVerSQL = dirbase & "logtrans." & archbase
On Error Resume Next
appAccess.DoCmd.TransferDatabase acExport, "Microsoft Access", SqlVerSQL,
acTable, tdf.Name, tdf.Name, False ' true solo definiciones"
End If
End If
 
R

Robert Morley

This probably isn't it, but just to cover the obvious possible problem, have
you tried rebooting, just to be sure there isn't some hidden instance of
Access that has your application open?



Rob
 
R

ramon soler

I tried from two different machines and still gives the error how can be
opened with dao before as false false and when tried to opencurrentdatabase
method gives the errorr, is there a way to filter it to see why
thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top