hi,
can't get this to work :/
Private Sub Numro_du_projet_Click()
If Len(Me.Numro_du_projet & "") < 1 Then
ElseIf Me.Localit.Column(2) = "" Or Me.Type.Column(2) = "" Then
MsgBox "Veuillez renseigner la localit et le type de projet."
Else
tSeq = Nz(DMax("Squence", "Projets", "Localit=" & Me.Localit & " and " & "Type=" & Me.Type))
hiCount = Nz(DLookup("Compteur", "Projets", "Squence=" & tSeq), 0) + 1
Me.Numro_du_projet = Me.Localit.Column(2) & "-" & Me.Type.Column(2) & "-" & Format(Compteur, "000")
End If
End Sub


