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
error.pngi 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
LVL 1
AZZA-KHAMEESAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
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
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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.
0
Jeffrey CoachmanMIS LiasonCommented:
You really don't need to specify the path to the default system.mdw file.
didn't know that...
Jeff
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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.
0
AZZA-KHAMEESAuthor Commented:
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
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You don't use OpenTable to search for data in a table. You use a Recordset, or something like DLookup. For example, if you want to search for a record in Users table:

Dim rst As DAO.Recordset
Set rst = Currentdb.OpenRecordset("SELECT * FROM Users WHERE UserName='" & Me.YourUserNameField & "'")

If Not (rst.EOF and rst.BOF) Then
  '/ you found the record
Else
  '/ you did not find the record
End If

You would obviously need to change the Field name, and the Me.YourUserNameField to correctly reference items in your project.

You can also use DLookup, DCount, or several other methods:

If Nz(DLookup("SomeFieldInTheUsersTable", "User", "UserName='" & Me.SomeTextbox & "'"), 0) <> 0 Then
  '/ you found the record
Else
  '/ you did not find the record
End If

As I mentioned previously, using OpenTable simply opens the table in the Access UI. I'm not sure why you're getting the error now, but changing the way you're looking up data to the correct way will eliminate the issue.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.