Help on Error msaccess.exe programme error

G

Guest

Hi,

Thanks In advance

Have a form called form 1 when I run it get error how do I solve it

All i am tring to do is make a fontend on each user machine:

Copy a .mdb from d: (Common Drive)
to c: drive
then close this mdb (which is a different one to the copied one) on d: drive
then open the c:drive mdb

Use on open
+ on loan
+ on current

Thanks

Trev






Private Sub Form_Current()
DoCmd.Quit
End Sub

Private Sub Form_Load()
On Error Resume Next
Dim strIcon As String
Dim strMsg As String
Dim strTitle As String
Dim strFrom As String
Dim strTo As String
Dim strCheck1 As String
Dim strCheck2 As String

'-- Check not opening from P
strCheck1 = "C:\ABC\Savings"

strFrom = "D:\20 Database\80 Test Backend\From\Non STD.MDB"
strTo = "C:\ABC\Savings\Non STD.MDB"

If CurrentProject.Path <> strCheck1 Then

strMsg = "Do you want to put this on your 'C' drive instead?" &
vbCrLf & vbCrLf & "In folder C:\ABC\Savings\CUA.MDB" ' Define message.

strTitle = "Front-End not designed to run from this location!"

If MsgBox(strMsg, vbYesNo + vbQuestion + vbDefaultButton2, strTitle)
= vbYes Then

Application.FollowHyperlink "C:\ABC\Savings\Non STD.MDB"
Else
DoCmd.Quit
End If

Else

End If




End Sub

Private Sub Form_Open(Cancel As Integer)
On Error Resume Next
Dim strIcon As String
Dim strMsg As String
Dim strTitle As String
Dim strFrom As String
Dim strTo As String
Dim strCheck1 As String
Dim strCheck2 As String

'-- Check not opening from P
strCheck1 = "C:\ABC\Savings"

strFrom = "D:\20 Database\80 Test Backend\From\Non STD.MDB"
strTo = "C:\ABC\Savings\Non STD.MDB"




MkDir "C:\ABC"
MkDir "C:\ABC\Savings"
Kill "C:\ABC\Savings\Non STD.LDB"
Kill "C:\ABC\Savings\Non STD.MDB"

FileCopy strFrom, strTo

End Sub
 
M

Michel Walsh

To split your database, use the tool, in the menu: Tools | Database
Utilities... | Database Splitter

You can practice with a dummy database, so any error of manipulation would
not be of consequence.

The tool creates a back end, that will stay on the machine, and a front end
that you will distribute on each PC. If you use the Database Splitter from a
PC which is NOT the pc that has the file, the full path name, with the
network machine name, will be kept in the 'links' for the tables and you
won't have to re-run the Linked Table Manager tool.



Hoping it may help,
Vanderghast, Access MVP
 
G

Guest

Thanks michael,

Database already has a backend just want to distribute the front end to each
user

What you are saying is how it was built in the first place.
 
M

Michel Walsh

Then, another possibility is that either a link, to a backend table, is
broken, either a library is missing, on the PC where the problem arises. If
some PC work fine, the link to a table is probably NOT the problem. About
the references, it is a matter to check them, if, on the PC with the error,
you see one (Ctrl_G, Tools | References... ) that starts its description
with the word MISSING, that is a problem.


Vanderghast, Access 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