[AccessD] Access XP - Access 2000

Nicholson, Karen cyx5 at cdc.gov
Tue Nov 23 07:25:49 CST 2004


Inherited Database - not my fault.  For the moment, I have an XP front
end in A2K format that has a link to open up one of a gazillion backends
until I can migrate the gazillion backends to one big a* backend in SQL
with one front-end.  So... I develop in XP due to the .printer
capabilities.  When this code (inherited, not my fault) runs, I get the
dreaded 3033 error that I do not have the permissions to open up the
database it is pointing to.  If I open up Access 2000, I am able to open
up the database, no problem.  

Any ideas?  Would putting in the user id and password make this click?
Thanks for the help.


Private Sub Open_PartsDB()
'Hide ManufacturerDialog form, attach Parts Database tables, and open
frmMainParts

    'On Error GoTo Err_Open_PartsDB
    
    Dim strDocName As String
    Dim strLinkCriteria As String
    Dim tdfTmpParts As TableDef, tdfTmpPartsTC As TableDef,
tdfTmpPartsProt As TableDef
    Dim strPrefix As String
    Dim strTblName As String
    Dim strMfr As String
    
    Dim dbsDest As DAO.Database
    Set dbsDest = CurrentDb()
    
    
       
    'Create table objects
    
        Set tdfTmpParts = dbsDest.TableDefs("Parts")
        Set tdfTmpPartsTC = dbsDest.TableDefs("TC-Parts")
        Set tdfTmpPartsProt = dbsDest.TableDefs("TC-Protections")
      
    
    If IsNull(MfrID) Then
        MsgBox "Please click a manufacturer in the list"
    Else
        
        strDocName = "frmMainParts"
        strTblName = "Parts"
        strLinkCriteria = "q:\tc_parts\" & MfrID & "\" & MfrID & ".mdb"
        strPrefix = Left$(dbsDest.TableDefs("Parts").Connect,
InStr(tdfTmpParts.Connect, "="))
        tdfTmpParts.Connect = ";DATABASE=" & strLinkCriteria
        tdfTmpParts.RefreshLink
        strPrefix = Left$(dbsDest.TableDefs("TC-Parts").Connect,
InStr(tdfTmpPartsTC.Connect, "="))
        tdfTmpPartsTC.Connect = ";DATABASE=" & strLinkCriteria
        tdfTmpPartsTC.RefreshLink
        strPrefix = Left$(dbsDest.TableDefs("TC-Protections").Connect,
InStr(tdfTmpPartsProt.Connect, "="))
        tdfTmpPartsProt.Connect = ";DATABASE=" & strLinkCriteria
        tdfTmpPartsProt.RefreshLink
        
        If IsTableEmpty(strTblName) = True Then
                MsgBox "There are no records in the Parts Database for "
& MfrID & ".", , "Parts table is empty"
                Exit Sub
         End If
        
        DoCmd.OpenForm strDocName, acNormal
        Forms!frmMainParts![MfrCode] = [MfrID]
        Forms![frmMainParts]![MfrName] = DLookup("[ManufacturerName]",
"Manufacturers", "[ManufacturerCode] = MfrID")
        DoCmd.SetWarnings False
        DoCmd.OpenQuery ("~MakeMfrCode"), acNormal
        Me.Visible = False
        
    End If



More information about the AccessD mailing list