CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Location
    Quebec, Canada
    Posts
    39

    VB in Access2000 a big problem for me but minor for you probebly

    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

  2. #2
    Join Date
    Apr 1999
    Location
    Quebec, Canada
    Posts
    39

    Re: VB in Access2000 a big problem for me but minor for you probebly

    forget what i ask i found a way to do it
    thank you anyway

    nath
    begginer programmer
    Access97/2000 and VB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured