-
error on changing forms
Using Office professional 2000 OS Windows 2000 Pro
I have two form in this data base. The first has a button that opens the second with DoCmd.OpenForm and it works fine. The second form has a button to close it using DoCmd.Close. This also works fine. However, when I get back to the origional form and try to do a search, I get the following error message.
MSACCESS has generated errors and will be closed by
windows. You will need to restart the program.
An error log is being created.
Does anybody know the problem or where I can find the error log. I can't seem to locate it.
This isn the code being used
OPEN CODE ON FORM 1:
Private Sub Forms_Track_Click()
On Error GoTo Err_Forms_Track_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim stLocate As String
stDocName = "Client Base 2"
DoCmd.OpenForm stDocName, , , ""
Exit_Forms_Track_Click:
Exit Sub
Err_Forms_Track_Click:
MsgBox Err.Description
Resume Exit_Forms_Track_Click
End Sub
CLOSE CODE ON FORM 2:
Private Sub Close_Click()
On Error GoTo Err_Close_Click
DoCmd.Close , , acSaveYes
Exit_Close_Click:
Exit Sub
Err_Close_Click:
MsgBox Err.Description
Resume Exit_Close_Click
End Sub
CODE TO FIND FORM 2 WITH SAME SOC SEC NO AS FORM 1:
Private Sub Form_Open(Cancel As Integer)
stLocate = Forms![Client Base]![SocSecNo]
Debug.Print stLocate
DoCmd.FindRecord stLocate, , True, , True
End Sub