I have a weird problem that I'm trying to solve but can't seem to find
a solution at this time. My Access database closes completely when the
"Else" of the VBA code is applicable.
I'm running Access XP Pro (2002) french on WinXP
Form: frm_commande (data coming from Qry_Commande)
Subform: sfrm_commande_detail
The following VBA code is running on Form_Current event of the subform.
All the fields used in the code are in the footer of the subform and I
created a two dummy text fields to help get the data. These data are
not saved in any tables, they are just used to calculate information.
Dummy 1 - Date_Facture which equals the Date_facturation field of the
form (I tried using the field of the form directly but I get the same
result).
Dummy 2 - TauxTPS which is used to get the dynamic rate that will be
used to calculate the proper tax amount according to the date.
Me.Refresh
If (IsNull(Me.Date_Facture)) Or Me.Date_Facture = " " Then
Exit Sub
Else
Me.Refresh
If Me.Date_Facture < Me.Date_juillet Then
Me.TauxTPS.ControlSource = "=0.07"
Else
Me.TauxTPS.ControlSource = "=0.06"
End If
End If
As soon as I have data in the Date_Facture field which is a core data
to establish the rate, the Access database closes completely... no
error message nothing. Tried to compact and repair the DB... still no
success. Anybody has an idea???