Link to home
Start Free TrialLog in
Avatar of AZZA-KHAMEES
AZZA-KHAMEESFlag for Bahrain

asked on

Macro error after splitting database

I have an access database was created, its working perfectly, after successfully splitting the database to back and front end i shared the _be file in shared drive and front end file in my local, i tried to run the front end and i am getting error when macro is executing
User generated imagei even put the back and front end in my local machine but still i am getting the error i tried to remove the macros but still getting errors since i am not the one developed this application. and the changes need to be urgently

the content of findorg()
Dim fdb As Database
Dim utab As Table, otab As Table
DBEngine.SystemDB = "System.mdw"
Set fdb = CurrentDb() 
Set utab = fdb.OpenTable("Users")
Set otab = fdb.OpenTable("Organization")
......

Open in new window

after tracing the function findorg() i found this error
Item not found in the collection for this line
Set utab = fdb.OpenTable("Users")

Open in new window

i tried to change the code to be
Set utab = fdb.Rescordsets("Users")

Open in new window

but still i am getting the same error

note that i am using back and front end, i have all my tables linked
can you help me please
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Don't use : "System.mdw"
...as this does not specify the exact path.

Use a fully qualified path instead, ...something like this:
    "C:\SomeFolder\System.mdw"

And make sure that you have permissions on that path
You really don't need to specify the path to the default system.mdw file. Access is already using that for your ULS, so there's nothing to do.

What exactly are you trying to do? OpenTable opens a table in Datasheet/Design view (i.e. in the Access interface). I doubt this is what you're trying to do, so let us know your goal and we can very likely suggest an alternate path.
You really don't need to specify the path to the default system.mdw file.
didn't know that...
Jeff
You'd only need to specify the path to the workgroup file if you want to use a specific .mdw file. Unless you've implemented ULS and have used a custom workgroup, Access will always use the default System.mdw.
Avatar of AZZA-KHAMEES

ASKER

thank you for the reply
actually what i am trying to do is to read 2 tables [Users] and [Organization] within my application and search for a specific user name from [Users] table
and always get stuck in the first line for open the table
Set utab = fdb.OpenTable("Users")

Open in new window

with error
Item not found in the collection for this line
and this error only happened when i split the database to back and front end
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial