re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" wrote in message
news:Eric écrivait
news::
Tu auras corrigé de toi même : avant et apres le AndRe Frederic
Mais pour me faciliter la tache ca plante dans le cas ou dlookup()
estnull ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^ ^
| et
peut être là
Eric
"fth" écrivait
news:408e5c6f$0$21470$:Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commandepasse dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" <thf63@hotmail.com> écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:
Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" <f_framZZ@hotmail.com> wrote in message
news:XnF94D89F9F4CE3CfframZZhotmailcom@207.46.248.16...
Eric <f_framZZ@hotmail.com> écrivait
news:XnF94D89EC8D4E19fframZZhotmailcom@207.46.248.16:
Tu auras corrigé de toi même : avant et apres le And
Re Frederic
Mais pour me faciliter la tache ca plante dans le cas ou dlookup()
est
null ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^ ^
| et
peut être là
Eric
"fth" <thf63@hotmail.com> écrivait
news:408e5c6f$0$21470$a0ced6e1@news.skynet.be:
Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:
3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commande
passe dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" wrote in message
news:Eric écrivait
news::
Tu auras corrigé de toi même : avant et apres le AndRe Frederic
Mais pour me faciliter la tache ca plante dans le cas ou dlookup()
estnull ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^ ^
| et
peut être là
Eric
"fth" écrivait
news:408e5c6f$0$21470$:Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commandepasse dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC
(via la query, ça passe) mais quand j'applique via le code, ça ne
passe pas G soit un message syntax error in INSERT ou syntax error in
UPDATE en fonction du fait que les records sont deja dans la table ou
pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC
(via la query, ça passe) mais quand j'applique via le code, ça ne
passe pas G soit un message syntax error in INSERT ou syntax error in
UPDATE en fonction du fait que les records sont deja dans la table ou
pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC
(via la query, ça passe) mais quand j'applique via le code, ça ne
passe pas G soit un message syntax error in INSERT ou syntax error in
UPDATE en fonction du fait que les records sont deja dans la table ou
pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC (via
la query, ça passe) mais quand j'applique via le code, ça ne passe pas
G soit un message syntax error in INSERT ou syntax error in UPDATE en
fonction du fait que les records sont deja dans la table ou pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
ci joint, le code avec vos modif....
If IsNull(DLookup("IDRB", "BC", "idrb=" & IDRB)) Then
DoCmd.RunSQL "INSERT INTO BC ( IDRB, IDcompany, IDcontact, RBstart,RBref,
RBstatus," & _
"RBforecastdate, RBcatprod, RbQuArt, RBTotalHw,
RBTotalOption,RBTotalSolution, " & _
"RBclickvolume, RBclickprice, RBLenght,
RBestimforecast,RBforecastCA," & _
"RBdonestatus,RBcomment, RBdetail, RBTotPaHw, RBTotPaOption,
RBTotPaSolution," & _
"RBTotPAcopy, RBdone,flag1) " & _
"SELECT running_business.IDRB,
running_business.IDcompany,running_business.IDcontact , " & _
"running_business.RBstart,
running_business.RBref,running_business.RBstatus , " & _
"running_business.RBforecastdate,
running_business.RBcatprod,running_business.RbQuArt , " & _
"running_business.RBTotalHw,
running_business.RBTotalOption,running_business.RBTotalSolution , " & _
"running_business.RBclickvolume,
running_business.RBclickprice,running_business.RBLenght , " & _
"running_business.RBestimforecast,
running_business.RBforecastCA,running_business.RBdonestatus , " & _
"running_business.RBcomment,
running_business.RBdetail,running_business.RBTotPaHw , " & _
"running_business.RBTotPaOption,
running_business.RBTotPaSolution,running_business.RBTotPAcopy, " & _
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
Else
'If (DLookup("idrb", "BC", "idrb=" & IDRB)) = IDRB Then
DoCmd.RunSQL "UPDATE BC INNER JOIN running_business ON BC.IDRB > running_business.IDRB " & _
"SET BC.IDRB = [running_business].[IDRB], " & _
"BC.IDcompany = [running_business].[IDcompany], " & _
"BC.IDcontact = [running_business].[IDcontact], " & _
"BC.RBstart = [running_business].[RBstart], " & _
"BC.RBref = [running_business].[RBref], " & _
"BC.RBstatus = [running_business].[RBstatus], " & _
"BC.RBforecastdate = [running_business].[RBforecastdate], " & _
"BC.RBcatprod = [running_business].[RBcatprod], " & _
"BC.RbQuArt = [running_business].[RbQuArt], " & _
"BC.RBTotalHw = [running_business].[RBTotalHw], " & _
"BC.RBTotalOption = [running_business].[RBTotalOption], " & _
"BC.RBTotalSolution = [running_business].[RBTotalSolution], " & _
"BC.RBclickvolume = [running_business].[RBclickvolume]," & _
"BC.RBestimforecast = [running_business].[RBestimforecast], " & _
"BC.RBforecastCA = [running_business].[RBforecastCA], " & _
"BC.RBdonestatus = [running_business].[RBdonestatus], " & _
"BC.RBcomment = [running_business].[RBcomment], " & _
"BC.RBdetail = [running_business].[RBdetail], " & _
"BC.RBTotPaHw = [running_business].[RBTotPaHw], " & _
"BC.RBTotPaOption = [running_business].[RBTotPaOption], " & _
"BC.RBTotPaSolution = [running_business].[RBTotPaSolution], " & _
"BC.RBTotPAcopy = [running_business].[RBTotPAcopy], " & _
"BC.flag1 = [running_business].[flag1], " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB &
")
AND (running_business.rbstatus = 'G');"
End If
End Sub
"Eric" wrote in message
news:re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" wrote in message
news:Eric écrivait
news::
Tu auras corrigé de toi même : avant et apres le AndRe Frederic
Mais pour me faciliter la tache ca plante dans le cas ou dlookup()
estnull ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^ ^
| et
peut être là
Eric
"fth" écrivait
news:408e5c6f$0$21470$:Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commandepasse dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC (via
la query, ça passe) mais quand j'applique via le code, ça ne passe pas
G soit un message syntax error in INSERT ou syntax error in UPDATE en
fonction du fait que les records sont deja dans la table ou pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
ci joint, le code avec vos modif....
If IsNull(DLookup("IDRB", "BC", "idrb=" & IDRB)) Then
DoCmd.RunSQL "INSERT INTO BC ( IDRB, IDcompany, IDcontact, RBstart,RBref,
RBstatus," & _
"RBforecastdate, RBcatprod, RbQuArt, RBTotalHw,
RBTotalOption,RBTotalSolution, " & _
"RBclickvolume, RBclickprice, RBLenght,
RBestimforecast,RBforecastCA," & _
"RBdonestatus,RBcomment, RBdetail, RBTotPaHw, RBTotPaOption,
RBTotPaSolution," & _
"RBTotPAcopy, RBdone,flag1) " & _
"SELECT running_business.IDRB,
running_business.IDcompany,running_business.IDcontact , " & _
"running_business.RBstart,
running_business.RBref,running_business.RBstatus , " & _
"running_business.RBforecastdate,
running_business.RBcatprod,running_business.RbQuArt , " & _
"running_business.RBTotalHw,
running_business.RBTotalOption,running_business.RBTotalSolution , " & _
"running_business.RBclickvolume,
running_business.RBclickprice,running_business.RBLenght , " & _
"running_business.RBestimforecast,
running_business.RBforecastCA,running_business.RBdonestatus , " & _
"running_business.RBcomment,
running_business.RBdetail,running_business.RBTotPaHw , " & _
"running_business.RBTotPaOption,
running_business.RBTotPaSolution,running_business.RBTotPAcopy, " & _
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
Else
'If (DLookup("idrb", "BC", "idrb=" & IDRB)) = IDRB Then
DoCmd.RunSQL "UPDATE BC INNER JOIN running_business ON BC.IDRB > running_business.IDRB " & _
"SET BC.IDRB = [running_business].[IDRB], " & _
"BC.IDcompany = [running_business].[IDcompany], " & _
"BC.IDcontact = [running_business].[IDcontact], " & _
"BC.RBstart = [running_business].[RBstart], " & _
"BC.RBref = [running_business].[RBref], " & _
"BC.RBstatus = [running_business].[RBstatus], " & _
"BC.RBforecastdate = [running_business].[RBforecastdate], " & _
"BC.RBcatprod = [running_business].[RBcatprod], " & _
"BC.RbQuArt = [running_business].[RbQuArt], " & _
"BC.RBTotalHw = [running_business].[RBTotalHw], " & _
"BC.RBTotalOption = [running_business].[RBTotalOption], " & _
"BC.RBTotalSolution = [running_business].[RBTotalSolution], " & _
"BC.RBclickvolume = [running_business].[RBclickvolume]," & _
"BC.RBestimforecast = [running_business].[RBestimforecast], " & _
"BC.RBforecastCA = [running_business].[RBforecastCA], " & _
"BC.RBdonestatus = [running_business].[RBdonestatus], " & _
"BC.RBcomment = [running_business].[RBcomment], " & _
"BC.RBdetail = [running_business].[RBdetail], " & _
"BC.RBTotPaHw = [running_business].[RBTotPaHw], " & _
"BC.RBTotPaOption = [running_business].[RBTotPaOption], " & _
"BC.RBTotPaSolution = [running_business].[RBTotPaSolution], " & _
"BC.RBTotPAcopy = [running_business].[RBTotPAcopy], " & _
"BC.flag1 = [running_business].[flag1], " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB &
")
AND (running_business.rbstatus = 'G');"
End If
End Sub
"Eric" <f_framZZ@hotmail.com> wrote in message
news:XnF94D8A475E930fframZZhotmailcom@207.46.248.16...
re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" <thf63@hotmail.com> écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:
Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" <f_framZZ@hotmail.com> wrote in message
news:XnF94D89F9F4CE3CfframZZhotmailcom@207.46.248.16...
Eric <f_framZZ@hotmail.com> écrivait
news:XnF94D89EC8D4E19fframZZhotmailcom@207.46.248.16:
Tu auras corrigé de toi même : avant et apres le And
Re Frederic
Mais pour me faciliter la tache ca plante dans le cas ou dlookup()
est
null ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^ ^
| et
peut être là
Eric
"fth" <thf63@hotmail.com> écrivait
news:408e5c6f$0$21470$a0ced6e1@news.skynet.be:
Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:
3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commande
passe dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC (via
la query, ça passe) mais quand j'applique via le code, ça ne passe pas
G soit un message syntax error in INSERT ou syntax error in UPDATE en
fonction du fait que les records sont deja dans la table ou pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
ci joint, le code avec vos modif....
If IsNull(DLookup("IDRB", "BC", "idrb=" & IDRB)) Then
DoCmd.RunSQL "INSERT INTO BC ( IDRB, IDcompany, IDcontact, RBstart,RBref,
RBstatus," & _
"RBforecastdate, RBcatprod, RbQuArt, RBTotalHw,
RBTotalOption,RBTotalSolution, " & _
"RBclickvolume, RBclickprice, RBLenght,
RBestimforecast,RBforecastCA," & _
"RBdonestatus,RBcomment, RBdetail, RBTotPaHw, RBTotPaOption,
RBTotPaSolution," & _
"RBTotPAcopy, RBdone,flag1) " & _
"SELECT running_business.IDRB,
running_business.IDcompany,running_business.IDcontact , " & _
"running_business.RBstart,
running_business.RBref,running_business.RBstatus , " & _
"running_business.RBforecastdate,
running_business.RBcatprod,running_business.RbQuArt , " & _
"running_business.RBTotalHw,
running_business.RBTotalOption,running_business.RBTotalSolution , " & _
"running_business.RBclickvolume,
running_business.RBclickprice,running_business.RBLenght , " & _
"running_business.RBestimforecast,
running_business.RBforecastCA,running_business.RBdonestatus , " & _
"running_business.RBcomment,
running_business.RBdetail,running_business.RBTotPaHw , " & _
"running_business.RBTotPaOption,
running_business.RBTotPaSolution,running_business.RBTotPAcopy, " & _
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
Else
'If (DLookup("idrb", "BC", "idrb=" & IDRB)) = IDRB Then
DoCmd.RunSQL "UPDATE BC INNER JOIN running_business ON BC.IDRB > running_business.IDRB " & _
"SET BC.IDRB = [running_business].[IDRB], " & _
"BC.IDcompany = [running_business].[IDcompany], " & _
"BC.IDcontact = [running_business].[IDcontact], " & _
"BC.RBstart = [running_business].[RBstart], " & _
"BC.RBref = [running_business].[RBref], " & _
"BC.RBstatus = [running_business].[RBstatus], " & _
"BC.RBforecastdate = [running_business].[RBforecastdate], " & _
"BC.RBcatprod = [running_business].[RBcatprod], " & _
"BC.RbQuArt = [running_business].[RbQuArt], " & _
"BC.RBTotalHw = [running_business].[RBTotalHw], " & _
"BC.RBTotalOption = [running_business].[RBTotalOption], " & _
"BC.RBTotalSolution = [running_business].[RBTotalSolution], " & _
"BC.RBclickvolume = [running_business].[RBclickvolume]," & _
"BC.RBestimforecast = [running_business].[RBestimforecast], " & _
"BC.RBforecastCA = [running_business].[RBforecastCA], " & _
"BC.RBdonestatus = [running_business].[RBdonestatus], " & _
"BC.RBcomment = [running_business].[RBcomment], " & _
"BC.RBdetail = [running_business].[RBdetail], " & _
"BC.RBTotPaHw = [running_business].[RBTotPaHw], " & _
"BC.RBTotPaOption = [running_business].[RBTotPaOption], " & _
"BC.RBTotPaSolution = [running_business].[RBTotPaSolution], " & _
"BC.RBTotPAcopy = [running_business].[RBTotPAcopy], " & _
"BC.flag1 = [running_business].[flag1], " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB &
")
AND (running_business.rbstatus = 'G');"
End If
End Sub
"Eric" wrote in message
news:re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" wrote in message
news:Eric écrivait
news::
Tu auras corrigé de toi même : avant et apres le AndRe Frederic
Mais pour me faciliter la tache ca plante dans le cas ou dlookup()
estnull ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^ ^
| et
peut être là
Eric
"fth" écrivait
news:408e5c6f$0$21470$:Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commandepasse dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se passer:
3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée (running_business.rbstatus="G")
devient une commande
facture--------------la facturation (BC.facture = yes) de la commande
passe
dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une table à
l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se passer:
3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée (running_business.rbstatus="G")
devient une commande
facture--------------la facturation (BC.facture = yes) de la commande
passe
dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une table à
l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se passer:
3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée (running_business.rbstatus="G")
devient une commande
facture--------------la facturation (BC.facture = yes) de la commande
passe
dans la table "facture"
en fonction du déroulement des activités, les infos passent d'une table à
l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
--
@+
Raymond Access MVP
http://access.seneque.free.fr/
http://access2003.free.fr/
http://users.skynet.be/mpfa/ pour débuter sur le forum
"fth" a écrit dans le message de
news:408e6d4c$0$10906$je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC
(via
la query, ça passe) mais quand j'applique via le code, ça ne passe pas
G soit un message syntax error in INSERT ou syntax error in UPDATE en
fonction du fait que les records sont deja dans la table ou pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
ci joint, le code avec vos modif....
If IsNull(DLookup("IDRB", "BC", "idrb=" & IDRB)) Then
DoCmd.RunSQL "INSERT INTO BC ( IDRB, IDcompany, IDcontact,
RBstart,RBref,
RBstatus," & _
"RBforecastdate, RBcatprod, RbQuArt, RBTotalHw,
RBTotalOption,RBTotalSolution, " & _
"RBclickvolume, RBclickprice, RBLenght,
RBestimforecast,RBforecastCA," & _
"RBdonestatus,RBcomment, RBdetail, RBTotPaHw, RBTotPaOption,
RBTotPaSolution," & _
"RBTotPAcopy, RBdone,flag1) " & _
"SELECT running_business.IDRB,
running_business.IDcompany,running_business.IDcontact , " & _
"running_business.RBstart,
running_business.RBref,running_business.RBstatus , " & _
"running_business.RBforecastdate,
running_business.RBcatprod,running_business.RbQuArt , " & _
"running_business.RBTotalHw,
running_business.RBTotalOption,running_business.RBTotalSolution , " & _
"running_business.RBclickvolume,
running_business.RBclickprice,running_business.RBLenght , " & _
"running_business.RBestimforecast,
running_business.RBforecastCA,running_business.RBdonestatus , " & _
"running_business.RBcomment,
running_business.RBdetail,running_business.RBTotPaHw , " & _
"running_business.RBTotPaOption,
running_business.RBTotPaSolution,running_business.RBTotPAcopy, " & _
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
Else
'If (DLookup("idrb", "BC", "idrb=" & IDRB)) = IDRB Then
DoCmd.RunSQL "UPDATE BC INNER JOIN running_business ON BC.IDRB > > running_business.IDRB " & _
"SET BC.IDRB = [running_business].[IDRB], " & _
"BC.IDcompany = [running_business].[IDcompany], " & _
"BC.IDcontact = [running_business].[IDcontact], " & _
"BC.RBstart = [running_business].[RBstart], " & _
"BC.RBref = [running_business].[RBref], " & _
"BC.RBstatus = [running_business].[RBstatus], " & _
"BC.RBforecastdate = [running_business].[RBforecastdate], " & _
"BC.RBcatprod = [running_business].[RBcatprod], " & _
"BC.RbQuArt = [running_business].[RbQuArt], " & _
"BC.RBTotalHw = [running_business].[RBTotalHw], " & _
"BC.RBTotalOption = [running_business].[RBTotalOption], " & _
"BC.RBTotalSolution = [running_business].[RBTotalSolution], " &
_
"BC.RBclickvolume = [running_business].[RBclickvolume]," & _
"BC.RBestimforecast = [running_business].[RBestimforecast], " &
_
"BC.RBforecastCA = [running_business].[RBforecastCA], " & _
"BC.RBdonestatus = [running_business].[RBdonestatus], " & _
"BC.RBcomment = [running_business].[RBcomment], " & _
"BC.RBdetail = [running_business].[RBdetail], " & _
"BC.RBTotPaHw = [running_business].[RBTotPaHw], " & _
"BC.RBTotPaOption = [running_business].[RBTotPaOption], " & _
"BC.RBTotPaSolution = [running_business].[RBTotPaSolution], " &
_
"BC.RBTotPAcopy = [running_business].[RBTotPAcopy], " & _
"BC.flag1 = [running_business].[flag1], " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB &
")AND (running_business.rbstatus = 'G');"
End If
End Sub
"Eric" wrote in message
news:re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause
Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" wrote in message
news:Eric écrivait
news::
Tu auras corrigé de toi même : avant et apres le AndRe Frederic
Mais pour me faciliter la tache ca plante dans le cas ou
dlookup()
estnull ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^
^
|
et
peut être là
Eric
"fth" écrivait
news:408e5c6f$0$21470$:Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commandepasse dans la table "facture"
en fonction du déroulement des activités, les infos passent
d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
--
@+
Raymond Access MVP
http://access.seneque.free.fr/
http://access2003.free.fr/
http://users.skynet.be/mpfa/ pour débuter sur le forum
"fth" <thf63@hotmail.com> a écrit dans le message de
news:408e6d4c$0$10906$a0ced6e1@news.skynet.be...
je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC
(via
la query, ça passe) mais quand j'applique via le code, ça ne passe pas
G soit un message syntax error in INSERT ou syntax error in UPDATE en
fonction du fait que les records sont deja dans la table ou pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
ci joint, le code avec vos modif....
If IsNull(DLookup("IDRB", "BC", "idrb=" & IDRB)) Then
DoCmd.RunSQL "INSERT INTO BC ( IDRB, IDcompany, IDcontact,
RBstart,RBref,
RBstatus," & _
"RBforecastdate, RBcatprod, RbQuArt, RBTotalHw,
RBTotalOption,RBTotalSolution, " & _
"RBclickvolume, RBclickprice, RBLenght,
RBestimforecast,RBforecastCA," & _
"RBdonestatus,RBcomment, RBdetail, RBTotPaHw, RBTotPaOption,
RBTotPaSolution," & _
"RBTotPAcopy, RBdone,flag1) " & _
"SELECT running_business.IDRB,
running_business.IDcompany,running_business.IDcontact , " & _
"running_business.RBstart,
running_business.RBref,running_business.RBstatus , " & _
"running_business.RBforecastdate,
running_business.RBcatprod,running_business.RbQuArt , " & _
"running_business.RBTotalHw,
running_business.RBTotalOption,running_business.RBTotalSolution , " & _
"running_business.RBclickvolume,
running_business.RBclickprice,running_business.RBLenght , " & _
"running_business.RBestimforecast,
running_business.RBforecastCA,running_business.RBdonestatus , " & _
"running_business.RBcomment,
running_business.RBdetail,running_business.RBTotPaHw , " & _
"running_business.RBTotPaOption,
running_business.RBTotPaSolution,running_business.RBTotPAcopy, " & _
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
Else
'If (DLookup("idrb", "BC", "idrb=" & IDRB)) = IDRB Then
DoCmd.RunSQL "UPDATE BC INNER JOIN running_business ON BC.IDRB > > running_business.IDRB " & _
"SET BC.IDRB = [running_business].[IDRB], " & _
"BC.IDcompany = [running_business].[IDcompany], " & _
"BC.IDcontact = [running_business].[IDcontact], " & _
"BC.RBstart = [running_business].[RBstart], " & _
"BC.RBref = [running_business].[RBref], " & _
"BC.RBstatus = [running_business].[RBstatus], " & _
"BC.RBforecastdate = [running_business].[RBforecastdate], " & _
"BC.RBcatprod = [running_business].[RBcatprod], " & _
"BC.RbQuArt = [running_business].[RbQuArt], " & _
"BC.RBTotalHw = [running_business].[RBTotalHw], " & _
"BC.RBTotalOption = [running_business].[RBTotalOption], " & _
"BC.RBTotalSolution = [running_business].[RBTotalSolution], " &
_
"BC.RBclickvolume = [running_business].[RBclickvolume]," & _
"BC.RBestimforecast = [running_business].[RBestimforecast], " &
_
"BC.RBforecastCA = [running_business].[RBforecastCA], " & _
"BC.RBdonestatus = [running_business].[RBdonestatus], " & _
"BC.RBcomment = [running_business].[RBcomment], " & _
"BC.RBdetail = [running_business].[RBdetail], " & _
"BC.RBTotPaHw = [running_business].[RBTotPaHw], " & _
"BC.RBTotPaOption = [running_business].[RBTotPaOption], " & _
"BC.RBTotPaSolution = [running_business].[RBTotPaSolution], " &
_
"BC.RBTotPAcopy = [running_business].[RBTotPAcopy], " & _
"BC.flag1 = [running_business].[flag1], " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB &
")
AND (running_business.rbstatus = 'G');"
End If
End Sub
"Eric" <f_framZZ@hotmail.com> wrote in message
news:XnF94D8A475E930fframZZhotmailcom@207.46.248.16...
re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause
Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" <thf63@hotmail.com> écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:
Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" <f_framZZ@hotmail.com> wrote in message
news:XnF94D89F9F4CE3CfframZZhotmailcom@207.46.248.16...
Eric <f_framZZ@hotmail.com> écrivait
news:XnF94D89EC8D4E19fframZZhotmailcom@207.46.248.16:
Tu auras corrigé de toi même : avant et apres le And
Re Frederic
Mais pour me faciliter la tache ca plante dans le cas ou
dlookup()
est
null ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^
^
|
et
peut être là
Eric
"fth" <thf63@hotmail.com> écrivait
news:408e5c6f$0$21470$a0ced6e1@news.skynet.be:
Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:
3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commande
passe dans la table "facture"
en fonction du déroulement des activités, les infos passent
d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
--
@+
Raymond Access MVP
http://access.seneque.free.fr/
http://access2003.free.fr/
http://users.skynet.be/mpfa/ pour débuter sur le forum
"fth" a écrit dans le message de
news:408e6d4c$0$10906$je sais, j'ai appliqué mais ça me donne toujours une erreur....(
Sanglots!)
j'ai refait une query APPEND qui à placé les records dans la table BC
(via
la query, ça passe) mais quand j'applique via le code, ça ne passe pas
G soit un message syntax error in INSERT ou syntax error in UPDATE en
fonction du fait que les records sont deja dans la table ou pas
j'avoue ne plus rien y comprendre
pfff ... cruelle machine!
ci joint, le code avec vos modif....
If IsNull(DLookup("IDRB", "BC", "idrb=" & IDRB)) Then
DoCmd.RunSQL "INSERT INTO BC ( IDRB, IDcompany, IDcontact,
RBstart,RBref,
RBstatus," & _
"RBforecastdate, RBcatprod, RbQuArt, RBTotalHw,
RBTotalOption,RBTotalSolution, " & _
"RBclickvolume, RBclickprice, RBLenght,
RBestimforecast,RBforecastCA," & _
"RBdonestatus,RBcomment, RBdetail, RBTotPaHw, RBTotPaOption,
RBTotPaSolution," & _
"RBTotPAcopy, RBdone,flag1) " & _
"SELECT running_business.IDRB,
running_business.IDcompany,running_business.IDcontact , " & _
"running_business.RBstart,
running_business.RBref,running_business.RBstatus , " & _
"running_business.RBforecastdate,
running_business.RBcatprod,running_business.RbQuArt , " & _
"running_business.RBTotalHw,
running_business.RBTotalOption,running_business.RBTotalSolution , " & _
"running_business.RBclickvolume,
running_business.RBclickprice,running_business.RBLenght , " & _
"running_business.RBestimforecast,
running_business.RBforecastCA,running_business.RBdonestatus , " & _
"running_business.RBcomment,
running_business.RBdetail,running_business.RBTotPaHw , " & _
"running_business.RBTotPaOption,
running_business.RBTotPaSolution,running_business.RBTotPAcopy, " & _
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
Else
'If (DLookup("idrb", "BC", "idrb=" & IDRB)) = IDRB Then
DoCmd.RunSQL "UPDATE BC INNER JOIN running_business ON BC.IDRB > > running_business.IDRB " & _
"SET BC.IDRB = [running_business].[IDRB], " & _
"BC.IDcompany = [running_business].[IDcompany], " & _
"BC.IDcontact = [running_business].[IDcontact], " & _
"BC.RBstart = [running_business].[RBstart], " & _
"BC.RBref = [running_business].[RBref], " & _
"BC.RBstatus = [running_business].[RBstatus], " & _
"BC.RBforecastdate = [running_business].[RBforecastdate], " & _
"BC.RBcatprod = [running_business].[RBcatprod], " & _
"BC.RbQuArt = [running_business].[RbQuArt], " & _
"BC.RBTotalHw = [running_business].[RBTotalHw], " & _
"BC.RBTotalOption = [running_business].[RBTotalOption], " & _
"BC.RBTotalSolution = [running_business].[RBTotalSolution], " &
_
"BC.RBclickvolume = [running_business].[RBclickvolume]," & _
"BC.RBestimforecast = [running_business].[RBestimforecast], " &
_
"BC.RBforecastCA = [running_business].[RBforecastCA], " & _
"BC.RBdonestatus = [running_business].[RBdonestatus], " & _
"BC.RBcomment = [running_business].[RBcomment], " & _
"BC.RBdetail = [running_business].[RBdetail], " & _
"BC.RBTotPaHw = [running_business].[RBTotPaHw], " & _
"BC.RBTotPaOption = [running_business].[RBTotPaOption], " & _
"BC.RBTotPaSolution = [running_business].[RBTotPaSolution], " &
_
"BC.RBTotPAcopy = [running_business].[RBTotPAcopy], " & _
"BC.flag1 = [running_business].[flag1], " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB &
")AND (running_business.rbstatus = 'G');"
End If
End Sub
"Eric" wrote in message
news:re
Raymond t'as donné la solution: sortir IDRB des "" dans la clause
Where:
"where running_business.IDRB=" & IDRB & " AND..." dans les 2 .
Eric
"fth" écrivait news:408e684f$0$21462$a0ced6e1
@news.skynet.be:Salut Eric,
Pour l'instant, ça semble planter dans les deux cas :-/
"Eric" wrote in message
news:Eric écrivait
news::
Tu auras corrigé de toi même : avant et apres le AndRe Frederic
Mais pour me faciliter la tache ca plante dans le cas ou
dlookup()
estnull ou dans l'autre ? Dans les 2 ?
Une remarque : il manque un espace là :
WHERE (running_business.IDRB = IDRB)AND
^
^
|
et
peut être là
Eric
"fth" écrivait
news:408e5c6f$0$21470$:Re bonjour,
pour plus de clarté, voici l'explication de ce qui devrait se
passer:3 tables:
running_business-----les affaires en cours
BC------------------une affaire gagnée
(running_business.rbstatus="G") devient une commande
facture--------------la facturation (BC.facture = yes) de la
commandepasse dans la table "facture"
en fonction du déroulement des activités, les infos passent
d'une
table à l'autre
Seules les affaires en cours gagnées passent en commande
mm opération pour passer de BC à Facture
encore merci
Frederic
"Raymond [mvp]" écrivait news:Ot9loaGLEHA.3428
@TK2MSFTNGP09.phx.gbl:il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
Bien vu Raymond, faut que je change les lunettes ;-)
Eric
"Raymond [mvp]" <XYZ.access.seneque@free.fr> écrivait news:Ot9loaGLEHA.3428
@TK2MSFTNGP09.phx.gbl:
il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
Bien vu Raymond, faut que je change les lunettes ;-)
Eric
"Raymond [mvp]" écrivait news:Ot9loaGLEHA.3428
@TK2MSFTNGP09.phx.gbl:il y a une virgule en trop après running_business.flag1:
"running_business.RBdone, running_business.flag1, " & _
"FROM running_business WHERE (running_business.IDRB = " & IDRB & ") AND
(running_business.rbstatus = 'G');"
"running_business.RBdone, running_business.flag1 " & _
Bien vu Raymond, faut que je change les lunettes ;-)
Eric
oui, mais raymond il a pas beaucoup de mérite. Une douzaine d'assistantes
(jeunes informaticiennes venues des iles) qui scructent
les news sur des écrans plasma 70 '' :o))
--
Pierre CFI
oui, mais raymond il a pas beaucoup de mérite. Une douzaine d'assistantes
(jeunes informaticiennes venues des iles) qui scructent
les news sur des écrans plasma 70 '' :o))
--
Pierre CFI
oui, mais raymond il a pas beaucoup de mérite. Une douzaine d'assistantes
(jeunes informaticiennes venues des iles) qui scructent
les news sur des écrans plasma 70 '' :o))
--
Pierre CFI
oups, ça progresse
sans la virgule dans la partie INSERT, ça fonctionne (merci)
mais j'ai encore une erreur dans la partie UPDATE:
run-time error '3075'
Syntax error (missing operator) in query expression
'[running_business].[flag1] FROM running_business'
quand je laisse la virgule dans UPDATE, error, quand je l'enleve, j'ai le
message d'erreur ci-dessus.....
kessako?
Frederic
oups, ça progresse
sans la virgule dans la partie INSERT, ça fonctionne (merci)
mais j'ai encore une erreur dans la partie UPDATE:
run-time error '3075'
Syntax error (missing operator) in query expression
'[running_business].[flag1] FROM running_business'
quand je laisse la virgule dans UPDATE, error, quand je l'enleve, j'ai le
message d'erreur ci-dessus.....
kessako?
Frederic
oups, ça progresse
sans la virgule dans la partie INSERT, ça fonctionne (merci)
mais j'ai encore une erreur dans la partie UPDATE:
run-time error '3075'
Syntax error (missing operator) in query expression
'[running_business].[flag1] FROM running_business'
quand je laisse la virgule dans UPDATE, error, quand je l'enleve, j'ai le
message d'erreur ci-dessus.....
kessako?
Frederic
C'est pour ça que tu insistes pour venir travailler avec moi, mais tant
que
ta motivation ne sera pas uniquement tournée mpfa, je refuserais.
--
@+
Raymond Access MVP
http://access.seneque.free.fr/
http://access2003.free.fr/
http://users.skynet.be/mpfa/ pour débuter sur le forum
"Pierre CFI [mvp]" a écrit dans le message de
news:oui, mais raymond il a pas beaucoup de mérite. Une douzaine
d'assistantes
(jeunes informaticiennes venues des iles) qui scructentles news sur des écrans plasma 70 '' :o))
--
Pierre CFI
C'est pour ça que tu insistes pour venir travailler avec moi, mais tant
que
ta motivation ne sera pas uniquement tournée mpfa, je refuserais.
--
@+
Raymond Access MVP
http://access.seneque.free.fr/
http://access2003.free.fr/
http://users.skynet.be/mpfa/ pour débuter sur le forum
"Pierre CFI [mvp]" <XXX_pierresalaun@aol.com> a écrit dans le message de
news:e3LT5lGLEHA.3012@tk2msftngp13.phx.gbl...
oui, mais raymond il a pas beaucoup de mérite. Une douzaine
d'assistantes
(jeunes informaticiennes venues des iles) qui scructent
les news sur des écrans plasma 70 '' :o))
--
Pierre CFI
C'est pour ça que tu insistes pour venir travailler avec moi, mais tant
que
ta motivation ne sera pas uniquement tournée mpfa, je refuserais.
--
@+
Raymond Access MVP
http://access.seneque.free.fr/
http://access2003.free.fr/
http://users.skynet.be/mpfa/ pour débuter sur le forum
"Pierre CFI [mvp]" a écrit dans le message de
news:oui, mais raymond il a pas beaucoup de mérite. Une douzaine
d'assistantes
(jeunes informaticiennes venues des iles) qui scructentles news sur des écrans plasma 70 '' :o))
--
Pierre CFI