error VBA and Linked Tables because of split 
Author Message
 error VBA and Linked Tables because of split

Hi, I have done a database without changing any security
and user groups. It is all the default options and I am
working on a network with win 2000. I decided to split the
database since I am almost over but once it is splitted
there are errors when I run my form. It is the VBA code
that looks that it does not have the proper access on the
splitted tables. It says "Running time error "3251" not
authorized operation for this type of object"
and my vba code is:

   Dim fDataBase As dataBase
    Dim fPostInstallTable As recordSet
    Dim fPhotoLogo As recordSet
    Dim fRecordSet As recordSet
    Dim fQueryDefs As QueryDefs
    Dim fQuery As QueryDef

    Set fDataBase = DBEngine.Workspaces(0).Databases(0)
    Set fPostInstallTable = fDataBase.OpenRecordset(name1)
    Set fPhotoLogo = fDataBase.OpenRecordset("FaceLogo")
    Set fQueryDefs = fDataBase.QueryDefs

    Set fQuery = fQueryDefs(name2)

     Debug.Print FFrom
    If FFrom <> 0 Then
        fQuery.Parameters(0) = FFrom
        fQuery.Parameters(1) = TTo
    End If

    Set fRecordSet = fQuery.OpenRecordset

    ....

====>error is here=>    fPhotoLogo.Index = "PrimaryKey"

can anyone help me?
thanx
Simon

.



Tue, 11 Jan 2005 00:47:44 GMT  
 error VBA and Linked Tables because of split
This issue is addressed on Dev Ashish's essential site:

http://www.mvps.org/access/tables/tbl0006.htm

HTH,
Kevin


Quote:
> Hi, I have done a database without changing any security
> and user groups. It is all the default options and I am
> working on a network with win 2000. I decided to split the
> database since I am almost over but once it is splitted
> there are errors when I run my form. It is the VBA code
> that looks that it does not have the proper access on the
> splitted tables. It says "Running time error "3251" not
> authorized operation for this type of object"
> and my vba code is:

>    Dim fDataBase As dataBase
>     Dim fPostInstallTable As recordSet
>     Dim fPhotoLogo As recordSet
>     Dim fRecordSet As recordSet
>     Dim fQueryDefs As QueryDefs
>     Dim fQuery As QueryDef

>     Set fDataBase = DBEngine.Workspaces(0).Databases(0)
>     Set fPostInstallTable = fDataBase.OpenRecordset(name1)
>     Set fPhotoLogo = fDataBase.OpenRecordset("FaceLogo")
>     Set fQueryDefs = fDataBase.QueryDefs

>     Set fQuery = fQueryDefs(name2)

>      Debug.Print FFrom
>     If FFrom <> 0 Then
>         fQuery.Parameters(0) = FFrom
>         fQuery.Parameters(1) = TTo
>     End If

>     Set fRecordSet = fQuery.OpenRecordset

>     ....

> ====>error is here=>    fPhotoLogo.Index = "PrimaryKey"

> can anyone help me?
> thanx
> Simon

> .



Tue, 11 Jan 2005 02:41:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Changing the linked table path without the linked table manager

2. Error 3052 while table splitting ... help

3. Unlinking linked tables with VBA

4. Path to linked tables in VBA?

5. Access97 - Linked Tables - Primary Keys - VBA

6. Maintaining links to tables in VBA

7. Linking Tables with VBA???

8. Linking Tables in Password protected databases using VBA

9. LINKING TABLES using VBA

10. Changing linked table source by VBA

11. Linked table in Access 97 using VBA code ????

12. VBA: linking a table from a secured access-db

 

 
Powered by phpBB® Forum Software