G
gogo
I must found the next number free in the table "assignation" for display in
add record in the form
table assignation:
#idpers numeric
typeCle numeric
noCle numeric
sub-Form : form.typeCle, form.noCle, TypeCle.Description, TypeCle.Quantité
I began this code but is not good:
Private Sub NoClé_DblClick(Cancel As Integer)
Dim cpt As Integer
cpt = 1
If IsNull(Assignation_TypeClé) Then
MsgBox "Inscrire un type de clé."
Else
this sentence is not good:
While (assignation.typeCle = Assignation_TypeCle And cpt =
assignation.NoCle)
cpt = cpt + 1
Wend
If cpt <= Typeclé_quantité Then
Assignation_NoClé = cpt
Else
MsgBox "Il n'y a plus de clé de disponible"
End If
End If
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...6424c1&dg=microsoft.public.access.formscoding
add record in the form
table assignation:
#idpers numeric
typeCle numeric
noCle numeric
sub-Form : form.typeCle, form.noCle, TypeCle.Description, TypeCle.Quantité
I began this code but is not good:
Private Sub NoClé_DblClick(Cancel As Integer)
Dim cpt As Integer
cpt = 1
If IsNull(Assignation_TypeClé) Then
MsgBox "Inscrire un type de clé."
Else
this sentence is not good:
While (assignation.typeCle = Assignation_TypeCle And cpt =
assignation.NoCle)
cpt = cpt + 1
Wend
If cpt <= Typeclé_quantité Then
Assignation_NoClé = cpt
Else
MsgBox "Il n'y a plus de clé de disponible"
End If
End If
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...6424c1&dg=microsoft.public.access.formscoding