F
Fernando Oliveira
Good afternoon,
I have a strange problem with the following code:
Private Sub Fechar_Click()
On Error GoTo Err_Fechar_Click
1 Me.FrmOrçComponentesSub.Requery
2 DoCmd.GoToControl (OrcSubReferência.Name)
3 Me.OrcSubPreçoEuro = Me!FrmOrçComponentesSub![SubTotal]
4 Forms![frmOrçcomponentesMain]![OrcSubPreçoEuro] =
Me.FrmOrçComponentesSub.Form!SubTotal
5 DoCmd.Close
Exit_Fechar_Click:
Exit Sub
Err_Fechar_Click:
MsgBox Err.Description
Resume Exit_Fechar_Click
End Sub
The problem is that when it runs on ACCESS 2007, everything works fine. When
it runs in ACESS 2000, lines 2,3,4 are ignored. However, in ACCESS 2000, if I
insert a breakpoint at line 1 and I continue the code after the break, all
lines are executed correctly.
I get no compilation errors or any other kind of errors.
I tend to believe that the problem is the VBA version (6.5.1040 in ACCESS
2007 vs. 6.0.8714), but as far as I know, there is no way to update VBA
version of ACCESS 2000.
Any help would be appreciated.
I have a strange problem with the following code:
Private Sub Fechar_Click()
On Error GoTo Err_Fechar_Click
1 Me.FrmOrçComponentesSub.Requery
2 DoCmd.GoToControl (OrcSubReferência.Name)
3 Me.OrcSubPreçoEuro = Me!FrmOrçComponentesSub![SubTotal]
4 Forms![frmOrçcomponentesMain]![OrcSubPreçoEuro] =
Me.FrmOrçComponentesSub.Form!SubTotal
5 DoCmd.Close
Exit_Fechar_Click:
Exit Sub
Err_Fechar_Click:
MsgBox Err.Description
Resume Exit_Fechar_Click
End Sub
The problem is that when it runs on ACCESS 2007, everything works fine. When
it runs in ACESS 2000, lines 2,3,4 are ignored. However, in ACCESS 2000, if I
insert a breakpoint at line 1 and I continue the code after the break, all
lines are executed correctly.
I get no compilation errors or any other kind of errors.
I tend to believe that the problem is the VBA version (6.5.1040 in ACCESS
2007 vs. 6.0.8714), but as far as I know, there is no way to update VBA
version of ACCESS 2000.
Any help would be appreciated.