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

IHM Discussion :

[Etat] Groupement/tri paramétré


Sujet :

IHM

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Août 2006
    Messages
    160
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Août 2006
    Messages : 160
    Points : 71
    Points
    71
    Par défaut [Etat] Groupement/tri paramétré
    Bonjour,

    Je possède une base de donnée avec 4 champs pour suivre des achats (Essence, nature, fournisseur, cout)

    Je souhaite à partir d'un formulaire ouvrir un etat selon ce que je recherche à savoir l'ensemble des combinaisons possibles :
    - trier par essence puis par nature pour voir la somme des couts
    - trier par nature puis par essence pour voir la moyenne des couts
    - trier par fournisseur puis par essence puis par nature pour la somme des couts
    - ...

    Au lieu de créer un etat pour chaque combinaison possible, je pensais créer 3 combobox ou je choisirai les champs à grouper et dans l'ordre voulu, puis un quatrième combobox qui déterminerai l'opération à effectuer sur le champs achat (somme, moy, compte, ...)
    Je rajouterai un bouton validé contenant le code qui me permettrai de créer un etat en fonction des paramètres choisis.

    une telle conception est-elle faisable ou je demande l'impossible?

    merci de vos réponses

  2. #2
    Rédacteur/Modérateur
    Avatar de argyronet
    Homme Profil pro
    Panseur de bobos en solutions ETL
    Inscrit en
    Mai 2004
    Messages
    5 128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Panseur de bobos en solutions ETL
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2004
    Messages : 5 128
    Points : 12 185
    Points
    12 185
    Billets dans le blog
    5
    Par défaut
    Bonjour,

    Tout est toujours possible...
    Tout dépend du temps que tu disposes pour le mettre ne oeuvre et est-ce que l'investissement de ce temps vaut le coup par rapport au choix de la génération de 4 états ?
    Tu as tout à ta disposition pour rendre un état dynamique mais là, un autre problème se pose, celui de l'ajustement et de la position des contrôles à ton goût et conséquent à ton choix précédent.

    Quel est ton intérêt au final ?

    Argy

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Août 2006
    Messages
    160
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Août 2006
    Messages : 160
    Points : 71
    Points
    71
    Par défaut
    j'ai du temps et j'aime les défis.

    je pense que cela vaut le coup. ça me permettrai de générer des stats de choisir mes fournisseurs selon mes besoins, ...

    Je souhaite appliqué cette méthode pour éviter d'avoir à créer beaucoup d'états ou requête.

  4. #4
    Rédacteur/Modérateur
    Avatar de argyronet
    Homme Profil pro
    Panseur de bobos en solutions ETL
    Inscrit en
    Mai 2004
    Messages
    5 128
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Panseur de bobos en solutions ETL
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2004
    Messages : 5 128
    Points : 12 185
    Points
    12 185
    Billets dans le blog
    5
    Par défaut
    Très bien...
    Tu pourrais alors commencer par construire tes 4 états avec les conditions qui s'imposent et associer les contrôles dans des groupes d'objets afin de les manipuler ensemble.
    => Certains contrôles Textboxes n'auront pas de ControlSource.
    Tu vérifies qu'ils sont opérationnels avec les requêtes idoines.
    Ensuite, tu emets tes conditions par code et contruits un 5ème état avec la gestion des entêtes et des regroupements dynamiquement selon les 4 cas précédents avec un SELECT CASE par exemple et une propriété ou une variable publique passée comme condition...
    Une fois que cela est opérationnel, tu construits une procédure de masquage/affichage des contrôles toujours selon les 4 cas précédents.
    Enfin tu ramènes dans cet état les contôles communs et tu affectes les champs indépendants à leur propriété ControleSource selon les 4 cas précédents...
    Pour terminer, la propriété RecordSource de ton état sera établie dans ton SELECT CASE...
    Voilà en gros une idée, il y en a certainement d'autres...
    Bon courage,

    Argy

  5. #5
    Membre régulier
    Profil pro
    Inscrit en
    Août 2006
    Messages
    160
    Détails du profil
    Informations personnelles :
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Août 2006
    Messages : 160
    Points : 71
    Points
    71
    Par défaut
    Bonjour,

    Désolé de ne pas avoir répondu plus tot mais je possède internet qu'au travail et je reprend aujourd'hui.

    Je m'aperçoit que je me lance dans quelque chose avec un niveau bien supérieur à mes compétences j'aime les défis mais j'aimerai pas faire perdre mon temps au autres.

    J'en ai profiter pendant mes vacances pour faire l'ensemble des combinaisons possibles soit 64 etat dans un premier temps. Pour les ouvrir j'utilise la fonction if..then..else soit 64 procédure différentes mais le code est trop lourd et access me dit "porcédure trop importante". Le but maintenant est de simplifier mon code. Quelqu'un à une solution voila un aperçu:
    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
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    If Forms!Synthèse!Forms!Synthèse!cmb1 = "Année" Then
    Forms!Synthèse!Aperçu_Vierge.Visible = False
    Forms!Synthèse!Aperçu_A.Visible = True
    Forms!Synthèse!Aperçu_AE.Visible = False
    Forms!Synthèse!Aperçu_AEF.Visible = False
    Forms!Synthèse!Aperçu_AEFN.Visible = False
    Forms!Synthèse!Aperçu_AEN.Visible = False
    Forms!Synthèse!Aperçu_AENF.Visible = False
    Forms!Synthèse!Aperçu_AF.Visible = False
    Forms!Synthèse!Aperçu_AFE.Visible = False
    Forms!Synthèse!Aperçu_AFEN.Visible = False
    Forms!Synthèse!Aperçu_AFN.Visible = False
    Forms!Synthèse!Aperçu_AFNE.Visible = False
    Forms!Synthèse!Aperçu_AN.Visible = False
    Forms!Synthèse!Aperçu_ANE.Visible = False
    Forms!Synthèse!Aperçu_ANEF.Visible = False
    Forms!Synthèse!Aperçu_ANF.Visible = False
    Forms!Synthèse!Aperçu_ANFE.Visible = False
    Forms!Synthèse!Aperçu_E.Visible = False
    Forms!Synthèse!Aperçu_EA.Visible = False
    Forms!Synthèse!Aperçu_EAF.Visible = False
    Forms!Synthèse!Aperçu_EAFN.Visible = False
    Forms!Synthèse!Aperçu_EAN.Visible = False
    Forms!Synthèse!Aperçu_EANF.Visible = False
    Forms!Synthèse!Aperçu_EF.Visible = False
    Forms!Synthèse!Aperçu_EFA.Visible = False
    Forms!Synthèse!Aperçu_EFAN.Visible = False
    Forms!Synthèse!Aperçu_EFN.Visible = False
    Forms!Synthèse!Aperçu_EFNA.Visible = False
    Forms!Synthèse!Aperçu_EN.Visible = False
    Forms!Synthèse!Aperçu_ENA.Visible = False
    Forms!Synthèse!Aperçu_ENAF.Visible = False
    Forms!Synthèse!Aperçu_ENF.Visible = False
    Forms!Synthèse!Aperçu_ENFA.Visible = False
    Forms!Synthèse!Aperçu_F.Visible = False
    Forms!Synthèse!Aperçu_FA.Visible = False
    Forms!Synthèse!Aperçu_FAE.Visible = False
    Forms!Synthèse!Aperçu_FAEN.Visible = False
    Forms!Synthèse!Aperçu_FAN.Visible = False
    Forms!Synthèse!Aperçu_FANE.Visible = False
    Forms!Synthèse!Aperçu_FE.Visible = False
    Forms!Synthèse!Aperçu_FEA.Visible = False
    Forms!Synthèse!Aperçu_FEAN.Visible = False
    Forms!Synthèse!Aperçu_FEN.Visible = False
    Forms!Synthèse!Aperçu_FENA.Visible = False
    Forms!Synthèse!Aperçu_FN.Visible = False
    Forms!Synthèse!Aperçu_FNA.Visible = False
    Forms!Synthèse!Aperçu_FNAE.Visible = False
    Forms!Synthèse!Aperçu_FNE.Visible = False
    Forms!Synthèse!Aperçu_FNEA.Visible = False
    Forms!Synthèse!Aperçu_N.Visible = False
    Forms!Synthèse!Aperçu_NA.Visible = False
    Forms!Synthèse!Aperçu_NAE.Visible = False
    Forms!Synthèse!Aperçu_NAEF.Visible = False
    Forms!Synthèse!Aperçu_NAF.Visible = False
    Forms!Synthèse!Aperçu_NAFE.Visible = False
    Forms!Synthèse!Aperçu_NE.Visible = False
    Forms!Synthèse!Aperçu_NEA.Visible = False
    Forms!Synthèse!Aperçu_NEAF.Visible = False
    Forms!Synthèse!Aperçu_NEF.Visible = False
    Forms!Synthèse!Aperçu_NEFA.Visible = False
    Forms!Synthèse!Aperçu_NF.Visible = False
    Forms!Synthèse!Aperçu_NFA.Visible = False
    Forms!Synthèse!Aperçu_NFAE.Visible = False
    Forms!Synthèse!Aperçu_NFE.Visible = False
    Forms!Synthèse!Aperçu_NFEA.Visible = False
    Else
    If Forms!Synthèse!cmb1 = "Année" And Forms!Synthèse!cmb2 = "Essence" Then
    Forms!Synthèse!Aperçu_Vierge.Visible = False
    Forms!Synthèse!Aperçu_A.Visible = False
    Forms!Synthèse!Aperçu_AE.Visible = True
    Forms!Synthèse!Aperçu_AEF.Visible = False
    Forms!Synthèse!Aperçu_AEFN.Visible = False
    Forms!Synthèse!Aperçu_AEN.Visible = False
    Forms!Synthèse!Aperçu_AENF.Visible = False
    Forms!Synthèse!Aperçu_AF.Visible = False
    Forms!Synthèse!Aperçu_AFE.Visible = False
    Forms!Synthèse!Aperçu_AFEN.Visible = False
    Forms!Synthèse!Aperçu_AFN.Visible = False
    Forms!Synthèse!Aperçu_AFNE.Visible = False
    Forms!Synthèse!Aperçu_AN.Visible = False
    Forms!Synthèse!Aperçu_ANE.Visible = False
    Forms!Synthèse!Aperçu_ANEF.Visible = False
    Forms!Synthèse!Aperçu_ANF.Visible = False
    Forms!Synthèse!Aperçu_ANFE.Visible = False
    Forms!Synthèse!Aperçu_E.Visible = False
    Forms!Synthèse!Aperçu_EA.Visible = False
    Forms!Synthèse!Aperçu_EAF.Visible = False
    Forms!Synthèse!Aperçu_EAFN.Visible = False
    Forms!Synthèse!Aperçu_EAN.Visible = False
    Forms!Synthèse!Aperçu_EANF.Visible = False
    Forms!Synthèse!Aperçu_EF.Visible = False
    Forms!Synthèse!Aperçu_EFA.Visible = False
    Forms!Synthèse!Aperçu_EFAN.Visible = False
    Forms!Synthèse!Aperçu_EFN.Visible = False
    Forms!Synthèse!Aperçu_EFNA.Visible = False
    Forms!Synthèse!Aperçu_EN.Visible = False
    Forms!Synthèse!Aperçu_ENA.Visible = False
    Forms!Synthèse!Aperçu_ENAF.Visible = False
    Forms!Synthèse!Aperçu_ENF.Visible = False
    Forms!Synthèse!Aperçu_ENFA.Visible = False
    Forms!Synthèse!Aperçu_F.Visible = False
    Forms!Synthèse!Aperçu_FA.Visible = False
    Forms!Synthèse!Aperçu_FAE.Visible = False
    Forms!Synthèse!Aperçu_FAEN.Visible = False
    Forms!Synthèse!Aperçu_FAN.Visible = False
    Forms!Synthèse!Aperçu_FANE.Visible = False
    Forms!Synthèse!Aperçu_FE.Visible = False
    Forms!Synthèse!Aperçu_FEA.Visible = False
    Forms!Synthèse!Aperçu_FEAN.Visible = False
    Forms!Synthèse!Aperçu_FEN.Visible = False
    Forms!Synthèse!Aperçu_FENA.Visible = False
    Forms!Synthèse!Aperçu_FN.Visible = False
    Forms!Synthèse!Aperçu_FNA.Visible = False
    Forms!Synthèse!Aperçu_FNAE.Visible = False
    Forms!Synthèse!Aperçu_FNE.Visible = False
    Forms!Synthèse!Aperçu_FNEA.Visible = False
    Forms!Synthèse!Aperçu_N.Visible = False
    Forms!Synthèse!Aperçu_NA.Visible = False
    Forms!Synthèse!Aperçu_NAE.Visible = False
    Forms!Synthèse!Aperçu_NAEF.Visible = False
    Forms!Synthèse!Aperçu_NAF.Visible = False
    Forms!Synthèse!Aperçu_NAFE.Visible = False
    Forms!Synthèse!Aperçu_NE.Visible = False
    Forms!Synthèse!Aperçu_NEA.Visible = False
    Forms!Synthèse!Aperçu_NEAF.Visible = False
    Forms!Synthèse!Aperçu_NEF.Visible = False
    Forms!Synthèse!Aperçu_NEFA.Visible = False
    Forms!Synthèse!Aperçu_NF.Visible = False
    Forms!Synthèse!Aperçu_NFA.Visible = False
    Forms!Synthèse!Aperçu_NFAE.Visible = False
    Forms!Synthèse!Aperçu_NFE.Visible = False
    Forms!Synthèse!Aperçu_NFEA.Visible = False
    Else
    If Forms!Synthèse!cmb1 = "Année" And Forms!Synthèse!cmb2 = "Essence" And Forms!Synthèse!cmb3 = "Fournisseur" Then
    Forms!Synthèse!Aperçu_Vierge.Visible = False
    Forms!Synthèse!Aperçu_A.Visible = False
    Forms!Synthèse!Aperçu_AE.Visible = False
    Forms!Synthèse!Aperçu_AEF.Visible = True
    Forms!Synthèse!Aperçu_AEFN.Visible = False
    Forms!Synthèse!Aperçu_AEN.Visible = False
    Forms!Synthèse!Aperçu_AENF.Visible = False
    Forms!Synthèse!Aperçu_AF.Visible = False
    Forms!Synthèse!Aperçu_AFE.Visible = False
    Forms!Synthèse!Aperçu_AFEN.Visible = False
    Forms!Synthèse!Aperçu_AFN.Visible = False
    Forms!Synthèse!Aperçu_AFNE.Visible = False
    Forms!Synthèse!Aperçu_AN.Visible = False
    Aperçu est un controle image qui me donne l'aperçu de mon etat
    J'ai 4 combobox : année; Essence; Fournisseur; Nature
    En fonction de cela je veux ouvrir le bon etat et aperçu

    Idée, merci d'avance

Discussions similaires

  1. Tri/Groupement sur Paramètres
    Par ALLODREN dans le forum Jasper
    Réponses: 9
    Dernier message: 12/05/2009, 18h36
  2. Etat effectuer tri
    Par guiguicool1 dans le forum IHM
    Réponses: 1
    Dernier message: 19/12/2008, 17h30
  3. Réponses: 2
    Dernier message: 15/06/2007, 13h50
  4. Tri paramétré d'une zone de liste
    Par syldudu dans le forum IHM
    Réponses: 5
    Dernier message: 05/02/2007, 11h01
  5. Procédure et tri paramétrable ...
    Par varlau dans le forum SQL
    Réponses: 9
    Dernier message: 03/05/2006, 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