IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Access Discussion :

impossibilité de trouver les champs dans la table te_frais


Sujet :

Access

  1. #1
    Débutant Avatar de laurent.w
    Inscrit en
    Décembre 2006
    Messages
    201
    Détails du profil
    Informations forums :
    Inscription : Décembre 2006
    Messages : 201
    Points : 70
    Points
    70
    Par défaut impossibilité de trouver les champs dans la table te_frais
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
     
    '''
    ''' Edit the choosen incident
    '''
    Public Function EditThisexpense()
    Dim dbs         As Database
    Dim rds         As Recordset
    Dim strSQL      As String
    Dim SQL         As String
    Dim frmcurrent  As Form
    Dim ctl         As Control
    Dim increment   As Integer
     
    'variable utilisé pour connaitre le numero de la ligne d'interet(y'en a 4 avec date pt/rec dans edt_incident)
    increment = 1
    ''' Open the recordset
    'strSQL = "SELECT *from te_frais where inc = " & incr & " and inc <>0;"
     
    While increment <> 5
            strSQL = "SELECT * from te_frais where inc = 1 and inc <>0;"
     
            Set dbs = CurrentDb
            Set rds = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
     
        If rds.EOF And rds.BOF Then
            rds.Close
            Set rds = Nothing
            dbs.Close
            Set dbs = Nothing
            MsgBox "Il n'ya plus de frais à envoyer.", vbApplicationModal + vbOKOnly + vbExclamation, "GED - Edition d'un dossier  ef frais"
            Exit Function
        Else
     
            MsgBox ("element trouvé")
     
            '''Check if the incident still exists
     
            '''Open the form
            If FormIsOpen("inpfrais") Then
                Forms("inpfrais").SetFocus
            Else
                DoCmd.OpenForm "inpfrais"
     
            End If
     
            ''' Fill the form
            rds.MoveFirst
            With Forms("inpfrais")
                .tbxNumeroDossier = ![IncidentRef]
                .tbxContractNumber = ![ContractNumber]
                .tbxNegociatedDate = ![NegociatedValueDate]
                .tbxEffectiveDate = ![EffectiveValueDate]
                .tbxFlowAmount = ![FlowAmount]
                .cbxCurrency = ![FlowCurrency]
                .cbxtdc = ![TDC]
                .lblPayedReceived.Caption = IIf(rds![PayReceive] = "P", "Payé", "Reçu")
                .cbxCounterpartyRef = ![CounterpartyRef]
                .cbxProfitCentercdr = ![ProfitCentercdr]
                .cbxProfitCenterbook = ![ProfitCenterbook]
     
            End With
            '''Close the instance
            rds.Close
            Set rds = Nothing
            dbs.Close
            Set dbs = Nothing
     
     
            '''Fill the other part of the form
            With Forms("inpfrais")
                .tbxCounterpartyrlc.Requery
            End With
     
     
            Call Frm_inpfrais_cmdValidate_Click
     
        End If
        increment = increment + 1
    Wend
     
    End Function
    ici le pb est qu'il ne trouve pas le champs dans la table te_frais alors qu'ils existent.
    pourquoi , j'ya fais bien reference dans ma requete , je ne comprends plus rien à access

    il faut savoir que j'appelle cette fonction depuis un autre formulaire

    j'ai rien dit manquait le rds au debur de chaque expression

  2. #2
    Expert éminent
    Avatar de cafeine
    Inscrit en
    Juin 2002
    Messages
    3 904
    Détails du profil
    Informations forums :
    Inscription : Juin 2002
    Messages : 3 904
    Points : 6 781
    Points
    6 781
    Par défaut
    Hello,

    où est le problème / bug ?
    Ne mettez pas "Problème" dans vos titres, par définition derrière toute question se cache un problème
    12 tutoriels Access



Discussions similaires

  1. [2008] Trouver les différences dans une table
    Par lucazzo dans le forum MS SQL Server
    Réponses: 3
    Dernier message: 26/03/2013, 11h47
  2. Ajouter les champs dans la table access
    Par faniette dans le forum C++Builder
    Réponses: 5
    Dernier message: 16/06/2011, 14h34
  3. trouver un champ dans plusieurs tables
    Par sdblepas dans le forum Langage SQL
    Réponses: 2
    Dernier message: 09/12/2009, 14h39
  4. inserer les champs dans un table
    Par Daniela dans le forum VBA Access
    Réponses: 2
    Dernier message: 15/06/2009, 08h30
  5. Réponses: 5
    Dernier message: 25/07/2005, 14h03

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo