Please help, Split Database problem

S

sean

Hello :D

I just split a database and I wanted to distribute the front end to users.
The front end works fine on my computer but when I copy the front end to
other users the database opens with an error and points to this code.

Private Sub Form_Load()
Dim gs_data_path As String
Set ws = Workspaces(0)
*****This is the line that gets highlighted*****
Open "c:\app.ini" For Input As #1
***********************************
Line Input #1, gs_data_path
If Len(gs_data_path) = 0 Then
gs_data_path = "c:\apps\tnkidney"
End If
Set db = ws.OpenDatabase(gs_data_path & "\tkfcontr.mdb")
Close #1
End Sub

Thanks.
 
D

Douglas J. Steele

What's the error you're getting? As well, what value's in app.ini when it's
failing?
 
S

sean

That's part of my problem. I'm not sure what this piece of code does. I
didn't build the database, it was built back in 98 by someone they can't find.

I'm thinking of copying that "app.ini" file to the "C" drive of the other
computers to see if that resolves the problem.
 
J

John W. Vinson

I'm thinking of copying that "app.ini" file to the "C" drive of the other
computers to see if that resolves the problem.

It should - the code is attempting to open that file and the error suggests
that the file does not exist on the user's C drive.

I'd be leery of having to store an ini file in the user's root C directory;
maybe you also need to find a suitable folder for it.

John W. Vinson [MVP]
 

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