• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

Access 2003 crashes on new server.

We have a fairly large access data base and are planing to move it over to a new terminal server machine.  The data base has a front end and a seperate back end.
As always we had to make sure we have all the referances, which we do.

We are coping the front end to the new C drive and the back end to a new F drive.  When the front end opens it will crash on a line code that is checking for any possible appointments for the particular user.  If I remove the code then it will run as expected.  

This is a 2003 access database and we are moving from a 2003 server to a 2008 R2 server.

What I don't understand is why this will run without any problems on the 2003 server and
fail on the 2008 server.  Is there something different with the referances etc. etc.
  • 3
  • 2
1 Solution
Jeffrey CoachmanMIS LiasonCommented:
The usual:

Make sure that all your Software is up to date and fully patched (Windows AND Office)
Run the compact/repair utility on the database
Compile any code (in the vba window, click: Debug-->Compile)
Run the compact/repair utility on the database again

Other questions:

Is this an issue for only this one user, or for all users?
Can you post the code, and indicate what line is crashing?

BillxxxxAuthor Commented:
Hi Jeff

Everything has been updated and compiled numerous times.
We have 10 machines that run the same front end without any problems.

If I make any changes in the front end I copy it to location where everyone else
can click on a button and update there front end.  So in a sense there may be some
differance. I have been doing this for over 15 years so I don't think that is the problem.

I did not mention that this also happens on a windows 7 laptop that I use.  I am thinking of taking all the referances from my machine and putting them on the new machine?

Thanks for your help.

Below is the code:

StrStatus = "open"
    StrUsername = User_name
    stDocName1 = "Appointments"
    SqlAppointments = ("SELECT * FROM Appointments WHERE (((Appointments.Employee)= '" & StrUsername & "') AND ((Appointments.MeetingDate)=Date()and (Status)='" & StrStatus & "')) order by meetingtime")
                                                                                                                                                                                              '  order by SnoozeFromDate
    Set Mydb = CurrentDb
    Set Myrs = Mydb.OpenRecordset(SqlAppointments)
        If Myrs.EOF = False Then
            DoCmd.OpenForm stDocName1, , , stLinkCriteria1
                If BlnShowTodaysSchedule = False Then
                MsgBox "There Are No Schedule Events Today For" & " " & StrUsername
                BlnShowTodaysSchedule = True
            End If
        End If
End If
Jeffrey CoachmanMIS LiasonCommented:
...and what line is it crashing on?

You may not be able to simply "Take" a reference from one machine an put it on another.

These references and libraries need to be installed properly and may will not work correctly (or worse cause corruption) on machines that they may not be compatible with..
BillxxxxAuthor Commented:
This is where it crashes   SqlAppointments = ("    in debug mode you can walk through it
and the following lines untill you get to  If Myrs.EOF =  So thats here it really crashes.
Jeffrey CoachmanMIS LiasonCommented:
...and what is the error?

AFAICT, as long as the variables:
StrStatus and StrUsername
...have valid values assigned to them, the code should run fine

To be sure, ...do this before the error line to see if everything looks OK:
msgbox "StrTatus= " & StrStatus & vbcrlf & "StrUsername= " & StrUsername & vbcrlf & "The SQL is=" & "SELECT * FROM Appointments WHERE Appointments.Employee=" & "'" & StrUsername & "'" & " AND " & "Appointments.MeetingDate=Date() " & " and " & "Status=" & "'" & StrStatus & "'" & "order by meetingtime"

I took the liberty of slimming the SQL for readability...

Also try using: CurrentDB(), ...instead of CurrentDB

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.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now