Click to See Complete Forum and Search --> : VB in Access2000 a big problem for me but minor for you probebly


Nath
January 10th, 2000, 09:08 AM
I've got a problem that's why I'm asking help. Ok, I've got three choices wether the call is open, closed or annuled, I'm able to see the open and the closed call but the annuled is always there as the first choice and the closed or open appears right after. I've tried a SELECT CASE didn't work. I know I'm doing something wrong but can't see what I've been on it for five days.
Please help.
Here's my code excuse me the text is in french


private Sub VerifierAppel_Click()

Dim dbAppelService as Database
Dim ptDonnee as DAO.Recordset
Dim ptAnnuler as DAO.Recordset
Dim Critere as string
Dim Critere2 as string


set dbAppelService = CurrentDb
set ptDonnee = dbAppelService.OpenRecordset("T_Donnee", dbOpenDynaset)
set ptAnnuler = dbAppelService.OpenRecordset("T_Travail", dbOpenDynaset)

Critere = "[No_Appel] = " & [VerifieAppel] & " And [DateFermeture] "
Critere2 = "[No_TypeTravail] = " & [VerifieAppel] & " And [DateAnnulation] "

If IsNull([VerifieAppel]) then
MsgBox ("Vous devez entrer un numéro d'un appel de service")

[VerifieAppel].SetFocus
else
ptDonnee.FindFirst Critere
ptAnnuler.FindFirst Critere2

If ptAnnuler.NoMatch then
MsgBox ("L'appel est annulé")
else
If ptDonnee.NoMatch then
MsgBox ("L'appel est ouvert")
else
MsgBox ("L'appel est fermé")
End If
End If
End If
End Sub




thanks in advanced

nath :)
begginer programmer
Access97/2000 and VB

Nath
January 10th, 2000, 02:05 PM
forget what i ask i found a way to do it
thank you anyway

nath :)
begginer programmer
Access97/2000 and VB