|
Publicité ' | |||||||||||||||||||||||
|
|
#1 | ||
|
Invité de passage
![]() Azo AzomixÉtudiant Inscription : janvier 2012 Messages : 10 ![]() |
Bonjour tout le monde
Je vous montre mon problème qui ne doit pas être compliquer à résoudre. http://imageshack.us/photo/my-images...stitrepgb.png/ J'ai 3 tables access. Je souhaite en vba récupérer la valeur de stock_anomalie dans la table stock_anomalie en fonction du numéros produit et du numéros d'anomalie que j'ai stocker dans des variables VBA J'arrive à faire la requete sous l assistant access, qui me donne ce code SQL : Code :
Code :
Query = " SELECT stock_anomalie FROM Produit INNER JOIN anomalie ON anomlie.N°anomalie = Stock_anomalie.N°Anomalie INNER JOIN Stock_anomalie ON Produit.N°Produit = Stock_anomalie.N°Produit WHERE Produit.N°Produit= " & num_produit & " AND anomalie.N°Anomalie= " & num_casse & ";" Code :
Query = "Select stock_anomalie FROM Stock_anomalie WHERE Produit.N°Produit = " & num_produit & " AND anomalie.N°anomalie = " & numm_casse & "" Merci |
||
|
|
00
|
|
|
#2 |
|
Membre éclairé
![]() Michel Développeur informatique Inscription : février 2008 Messages : 263 ![]() |
Sans doute au niveau de ton Where qui doit ressembler à ceci :
Code :
WHERE anomalie.N°Anomalie=" & Num_Anomalie & " AND Produit.N°Produit=" & Num_Produit Code :
WHERE anomalie.N°Anomalie='" & Num_Anomalie & "' AND Produit.N°Produit='" & Num_Produit & "'" Code :
Select stock_anomalie FROM Stock_anomalie WHERE Produit.N°Produit = " & num_produit & " AND anomalie.N°anomalie = " & numm_casse Code :
Select stock_anomalie FROM Stock_anomalie WHERE Produit.N°Produit = '" & num_produit & "' AND anomalie.N°anomalie = '" & numm_casse & "'" Code :
INNER JOIN anomalie ON anomlie.N°anomalie Michel |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com