Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000-97 incompatibilities

Status
Not open for further replies.

anto

Technical User
Aug 2, 2000
7
IT
Sorry for bothering, but tonight I'm in such a situation we, in Italy, define being in big trouble. A friend of mine wrote an Access 2000 DB, which he converted in Access 97 format, as requested by the costumer. Unfortunately the conversion, while preserving all the tables and queries, has a big issue whith one mask. When you try to open this one, the whole application crush. I'm not an Access developer, nor a VB programmer.
If someone happend to give a look to the following code, and have a suggestion on how to solve the trouble, he'll gain my aethernal gratitude.
thanks.

# starts code:

Option Compare Database

Private Sub CodComune_LostFocus()
If IsNull(Me![CAP]) Then
Forms![Interviste 1/2]![CAP] = Forms![Interviste 1/2]![Sottomaschera città].Form![CAP]
End If
If IsNull(Me![Telefono]) Then
Forms![Interviste 1/2]![Telefono] = Forms![Interviste 1/2]![Sottomaschera città].Form![Prefisso]
End If
If IsNull(Me![Fax]) Then
Forms![Interviste 1/2]![Fax] = Forms![Interviste 1/2]![Sottomaschera città].Form![Prefisso]
End If
If IsNull(Me![Regione]) Then
Forms![Interviste 1/2]![Regione] = Forms![Interviste 1/2]![Sottomaschera città].Form![Regione]
End If
If IsNull(Me![Provincia]) Then
Forms![Interviste 1/2]![Provincia] = Forms![Interviste 1/2]![Sottomaschera città].Form![Provincia]
End If
If IsNull(Me![Paese]) Then
Forms![Interviste 1/2]![Paese] = Forms![Interviste 1/2]![Sottomaschera città].Form![Paese]
End If
End Sub

Private Sub CodFormaGiuridica_DblClick(Cancel As Integer)
DoCmd.OpenForm "Forme giuridiche", , , "[CodFormaGiuridica]=Forms![Interviste 1/2]![CodFormaGiuridica]", , acDialog
End Sub

Private Sub CodFormaGiuridica_LostFocus()
If Me![CodFormaGiuridica] > 1 Then
Me![N° organizzazioni Fondatrici].Enabled = True
Me![di cui associazioni di vol iscritte al RRV - Fondatrici].Enabled = True
Me![di cui associazioni non iscritte al RRV - Fondatrici].Enabled = True
Me![di cui associazioni di prom Sociale - Fondatrici].Enabled = True
Me![di cui coop sociali - Fondatrici].Enabled = True
Me![di cui altro testo - Fondatrici].Enabled = True
Me![di cui altro num - Fondatrici].Enabled = True
End If
End Sub

Private Sub CodIntervistatore_DblClick(Cancel As Integer)
DoCmd.OpenForm "Intervistatori", , , "[CodIntervistatore] = Forms![Intervistatori]![CodIntervistatore]", , acDialog
End Sub

Private Sub Comando132_Click()
DoCmd.OpenForm "Interviste 2/2", , , "[CodiceIntervista]=forms![interviste 1/2]![CodiceIntervista]"
DoCmd.Close acForm, "Interviste 1/2"
DoCmd.SelectObject acForm, "Interviste 2/2"
End Sub

Private Sub Ctl914_altro_s_n_Click()
If Me![914 altro s/n] = -1 Then
Me![914 altro testo].Visible = True
ElseIf Me![914 altro s/n] = 0 Then
Me![914 altro testo].Visible = False
End If
End Sub

Private Sub Form_Current()
If Me![Organi di gestione e controllo del Centro di servizio separati ?] = -1 Then
Me![Etichetta122].Visible = True
Me![13 Quali].Visible = True
Else
Me![Etichetta122].Visible = False
Me![13 Quali].Visible = False
End If
If Me![CodFormaGiuridica] > 1 Then
Me![N° organizzazioni Fondatrici].Enabled = True
Me![di cui associazioni di vol iscritte al RRV - Fondatrici].Enabled = True
Me![di cui associazioni non iscritte al RRV - Fondatrici].Enabled = True
Me![di cui associazioni di prom Sociale - Fondatrici].Enabled = True
Me![di cui coop sociali - Fondatrici].Enabled = True
Me![di cui altro testo - Fondatrici].Enabled = True
Me![di cui altro num - Fondatrici].Enabled = True
Else
Me![N° organizzazioni Fondatrici].Enabled = False
Me![di cui associazioni di vol iscritte al RRV - Fondatrici].Enabled = False
Me![di cui associazioni non iscritte al RRV - Fondatrici].Enabled = False
Me![di cui associazioni di prom Sociale - Fondatrici].Enabled = False
Me![di cui coop sociali - Fondatrici].Enabled = False
Me![di cui altro testo - Fondatrici].Enabled = False
Me![di cui altro num - Fondatrici].Enabled = False
End If
If Me![914 altro s/n] = -1 Then
Me![914 altro testo].Visible = True
ElseIf Me![914 altro s/n] = 0 Then
Me![914 altro testo].Visible = False
End If
DoCmd.GoToControl "Data rilevazione"
End Sub

Private Sub Organi_di_gestione_e_controllo_del_Centro_di_servizio_separati___Click()
If Me![Organi di gestione e controllo del Centro di servizio separati ?] = -1 Then
Me![Etichetta122].Visible = True
Me![13 Quali].Visible = True
Else
Me![Etichetta122].Visible = False
Me![13 Quali].Visible = False
End If
End Sub

Private Sub Territorio_di_competenza_DblClick(Cancel As Integer)
DoCmd.OpenForm "Territori di competenza", , , "[CodTerritorioCompetenza] = Forms![Interviste 1/2]![Territorio di competenza]", , acDialog
End Sub
Private Sub Comando131_Click()
On Error GoTo Err_Comando131_Click


DoCmd.Close

Exit_Comando131_Click:
Exit Sub

Err_Comando131_Click:
MsgBox Err.Description
Resume Exit_Comando131_Click

End Sub
 
Hi,
I don't see anything wrong with the code at the moment. Could you explain a little more about the crash? The exact point that it occurs. Can you get into the back end (tables/queries/forms/macros/modules view) of the database? If it crashes on the startup form - hold down the shift key while opening the database - don't let go until the database opens into the tables/queries/forms/macros/modules view. If you suspect that it is the VB code that is causing the crash then set a break point (right-click the line of code and choose toggle/breakpoint) and step through the code (run the code as usual) line by line (press F8) until you find the line that causes the crash. This will be a great help in deturmining what is wrong.

Rob Marriott
rob@career-connections.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top