Problem with database - can't open form for input! Corrupt?

HelenWy

Registered User.
Local time
Today, 21:22
Joined
Feb 3, 2009
Messages
30
Hi guys - no idea if anyone can help but we have a database at work that we use daily to input data (using forms) but the main form we use now won't open. I have tried every way I can think of to get at it, but it almost appears that Access can no longer "see" the form. You can copy and paste it or do save as, but then you can't delete the new version, and also can't open that. It won't open to input, and it won't open in design view.

We have a basic switchboard that we use with buttons on that open relevant forms for input, and when you click on the button for the complaints form (the one with the issues) you get the message "You cancelled the previous operation", and that's all. No idea which operation it is referring to...

I have tried the repair facility, which did nothing. I have tried resaving the database with a new name. I have tried copying/pasting and resaving the form. Nothing.

Please help!

Last resort is ICT having to restore it from backup but they have to restore from Monday night (now being Weds morning) as the problem was encountered yesterday and they are apparently VERY slow in getting anything done there...

If we can fix it in the meantime then that would be brilliant. Hope someone can help!

PS I can't attach a copy as it is full of confidential data and it would take me too long to remove in a copy etc.
 
have you tried opening the form in design view? once you're there you can punch in ALT+F11 and bring up the VBA editor. once there you can do a quick scan of anything that might be suspicious and rem it out (i.e., instead of deleting a line of code, change it to a "remark" but adding a single quotation mark - ' - to the very front of the line.

HTH

edit: in fact, you won't need to access the form to access the VBA - just punch in ALT+F11 from the database window and you can usually navigate to the right form from the left-hand project explorer pane. btw, what version of access are you using? do you have a back end and front end?
 
You have not said what version of Access you are using and on what platform.

What you could try is creating a blank database and importing the necessary files to make it work and test in the new database. If this finds the issue then import all other objects and link the necessary back end as normal. AhAh! is the database split aready between FE and BE. Again this may be an issue.

David
 
Without seeing the code behind the form, you may have a problem when opening the form, are using Dlookup etc when the form opens? You get this error message when you are using Dlookup and there is nothing (NULL value) to return.
 
Thanks for your replies - I have tried looking at the code using Alt+F11 (can't open the form in any way, not even in design view) but nothing looks odd, and I don't know if I would see any problems if there were any anyway!

I have Access 2002 on XP - what we're dictated to work with here.

And sorry - have no idea what front and back end is, so can't answer that one!
 
I'm not aware that I'm using DLookup as this is an inherited database and I didn't set it up. I know however that I didn't change anything before we got the problem, so really not sure what caused the issue. Here is the code behind the form, if this is what is needed. Might help!

Code:
Option Compare Database
 
Private Sub cboArea2_Change()
Me.cboCluster2 = Null
Me.cboCluster2.Requery
Me.cboTypeofService2 = Null
Me.cboTypeofService2.Requery
End Sub
 
Private Sub cboDivision2_Change()
Me.cboArea2 = Null
Me.cboArea2.Requery
Me.cboServiceArea2 = Null
Me.cboServiceArea2.Requery
Me.cboTypeofService2 = Null
Me.cboTypeofService2.Requery
Me.cboCluster2 = Null
Me.cboCluster2.Requery
End Sub
 
Private Sub cboServiceArea2_Change()
Me.cboTypeofService2 = Null
Me.cboTypeofService2.Requery
Me.cboArea2 = Null
Me.cboArea2.Requery
Me.cboCluster2 = Null
Me.cboCluster2.Requery
End Sub
 
Private Sub Form_Current()
Me.cboServiceArea2.Requery
Me.cboArea2.Requery
Me.cboTypeofService2.Requery
Me.cboCluster2.Requery
End Sub
Private Sub FIND_CLIENT_Click()
On Error GoTo Err_FIND_CLIENT_Click
 
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_FIND_CLIENT_Click:
Exit Sub
Err_FIND_CLIENT_Click:
MsgBox Err.Description
Resume Exit_FIND_CLIENT_Click
 
End Sub
 
Private Sub ADD_CLIENT_Click()
On Error GoTo Err_ADD_CLIENT_Click
 
DoCmd.GoToRecord , , acNewRec
Exit_ADD_CLIENT_Click:
Exit Sub
Err_ADD_CLIENT_Click:
MsgBox Err.Description
Resume Exit_ADD_CLIENT_Click
 
End Sub
 
Private Sub DELETE_RECORD_Click()
On Error GoTo Err_DELETE_RECORD_Click
 
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_DELETE_RECORD_Click:
Exit Sub
Err_DELETE_RECORD_Click:
MsgBox Err.Description
Resume Exit_DELETE_RECORD_Click
 
End Sub
 
Private Sub SECTION_2__DIVISION_LOCALITY_TYPE_Click()
cboDivision_Click
End Sub
Private Sub frmOpenReports_Click()
On Error GoTo Err_frmOpenReports_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CS_REPORTS"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_frmOpenReports_Click:
Exit Sub
Err_frmOpenReports_Click:
MsgBox Err.Description
Resume Exit_frmOpenReports_Click
 
End Sub
 
Private Sub Print_Form_Click()
On Error GoTo Err_Print_Form_Click
 
DoCmd.PrintOut
Exit_Print_Form_Click:
Exit Sub
Err_Print_Form_Click:
MsgBox Err.Description
Resume Exit_Print_Form_Click
 
End Sub
 
Private Sub Print_Record_Click()
On Error GoTo Err_Print_Record_Click
 
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Exit_Print_Record_Click:
Exit Sub
Err_Print_Record_Click:
MsgBox Err.Description
Resume Exit_Print_Record_Click
 
End Sub
 
Private Sub RETURN_TO_NAVIGATION_Click()
On Error GoTo Err_RETURN_TO_NAVIGATION_Click
 
DoCmd.Close
Exit_RETURN_TO_NAVIGATION_Click:
Exit Sub
Err_RETURN_TO_NAVIGATION_Click:
MsgBox Err.Description
Resume Exit_RETURN_TO_NAVIGATION_Click
 
End Sub
 
Private Sub Save_Record_Click()
On Error GoTo Err_Save_Record_Click
 
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_Save_Record_Click:
Exit Sub
Err_Save_Record_Click:
MsgBox Err.Description
Resume Exit_Save_Record_Click
 
End Sub
 
Private Sub Diversity_Click()
On Error GoTo Err_Diversity_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Diversity"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Diversity_Click:
Exit Sub
Err_Diversity_Click:
MsgBox Err.Description
Resume Exit_Diversity_Click
 
End Sub
 
An application is normally split into two parts the front end and the back end. The front end consists of all the objects with exception of tables. These are kept in the Back End. The BE usually resides on a shared server and all users have a copy of the front end on there machines. The tables are then linked to the front end.

It appears to me that this has not been done. Think of it this way if you have only one entrance then users are going to get stuck trying to get in. However if each user has their own private entrance then they will all get in without issues.

Think on the lines of a football match, Give all fans the same turnstile to go though, they may all eventually get in but confusion and fighting may occur as to who's next. However split them up so that they all enter via a seperate entrance then everybody will get in with fuss and they can all see the match together. The Pitch being the back end and the turnstiles being the front ends.

David
 
Ah, I see (I think). Well, I can't do anything with the database now so will have to wait for ICT to get their finger out and restore to backup. Will look into the BE and FE bits for when that's done!
 
The more users you have the greater the importance of converting your application. Unsplit mdb's are very succeptable to corruption, not only the forms, reports, etc but also, and mor importantly, the data.

Also if you want to make a modification to the system you can do with a development copy of the front end then once tested it can be deployed out to all users. During this development time users will continue to use the existing version. From what I gather your company is now at a stand still until the backup has been restored. Also you have lost any data captured between backup and restore. If the database has been split you would not have lost any data whatsoever.

Food for thought.

David
 

Users who are viewing this thread

Back
Top Bottom