D
Diego via AccessMonster.com
Hi All
i have a date field called Data_Nascita and and unbound field to calculate
the age (called Anni) with
=DateDiff("yyyy",[Data_Nascita],Date())-IIf(Format([Data_Nascita],"mmdd")
Now i want to write automatically other two fields (Categoria and Descrizione)
in the form related to age (Anni) value.
I start to write this code (after update of unbounded field) but it does not
work
If Me.Anni = 12 Then
Me.Categoria = "P_1" And Me.Descrizione = "Pulcini 1_A"
ElseIf Me.Anni = 13 Then
Me.Categoria = "P_2" And Me.Descrizione = "Pulcini 2_A"
ElseIf Me.Anni = 14 Then
Me.Categoria = "P_3" And Me.Descrizione = "Pulcini 3_A"
End If
I have not any error, but the Categoria adn Descrizione field are not updated
(empty)
Can you help me ?
Best regards
Diego
i have a date field called Data_Nascita and and unbound field to calculate
the age (called Anni) with
=DateDiff("yyyy",[Data_Nascita],Date())-IIf(Format([Data_Nascita],"mmdd")
this works enoght.Format(Date(),"mmdd"),1,0)
Now i want to write automatically other two fields (Categoria and Descrizione)
in the form related to age (Anni) value.
I start to write this code (after update of unbounded field) but it does not
work
If Me.Anni = 12 Then
Me.Categoria = "P_1" And Me.Descrizione = "Pulcini 1_A"
ElseIf Me.Anni = 13 Then
Me.Categoria = "P_2" And Me.Descrizione = "Pulcini 2_A"
ElseIf Me.Anni = 14 Then
Me.Categoria = "P_3" And Me.Descrizione = "Pulcini 3_A"
End If
I have not any error, but the Categoria adn Descrizione field are not updated
(empty)
Can you help me ?
Best regards
Diego