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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624
| Private Sub Form_Close()
DoCmd.SetWarnings True
End Sub
Private Sub Form_Load()
DoCmd.SetWarnings False
Me.TimerInterval = 10000
End Sub
Private Sub Form_Timer()
Dim bds_1 As Database
Dim table_1 As String
Dim r_table_1 As Recordset
Set bds_1 = CurrentDb
table_1 = "dom_ps_zone"
Set r_table_1 = bds_1.OpenRecordset(table_1, dbOpenDynaset)
r_table_1.MoveFirst
Set r_table_1 = Nothing
Set bds_1 = Nothing
End Sub
Private Sub maj_donnees_Click()
On Error GoTo Err_maj_donnees_Click
Dim bds As Database
Dim table As String
Dim r_table As Recordset
'Dim cpt
Dim sql As String
'virifier si le Dom à bien vider les tables !!!
Dim bds_1 As Database
Dim table_1 As String
Dim r_table_1 As Recordset
Set bds_1 = CurrentDb
table_1 = "dom_ps_category_product"
Set r_table_1 = bds_1.OpenRecordset(table_1, dbOpenDynaset)
If r_table_1.BOF = False Then
MsgBox "Il faut vider les tables dans l'admin de la boutique !"
Set r_table_1 = Nothing
Set bds_1 = Nothing
Exit Sub
End If
Set r_table_1 = Nothing
Set bds_1 = Nothing
'
'
'Me![info] = "Supression catégories textes"
'Me.Repaint
'DoCmd.OpenQuery "r_cat_lang_sup_distant" 'vide cat distant
'
'Me![info] = "Supression catégories"
'Me.Repaint
'DoCmd.OpenQuery "r_cat_sup_distant" 'vide cat designation distant
'
'Me![info] = "Supression fabricants"
'Me.Repaint
'DoCmd.OpenQuery "r_fab_sup_distant" 'vide fab serveur
'
'Me![info] = "Supression articles"
'Me.Repaint
'DoCmd.OpenQuery "r_ref_sup_distant" 'vide donnees ref distant
'
'Me![info] = "Supression articles textes"
'Me.Repaint
'DoCmd.OpenQuery "r_ref_lang_sup_distant" 'vide donnees ref lang distant
'
''requete à problème
'
''Me![info] = "1"
''Me.Repaint
''DoCmd.OpenQuery "r_ref_cat_sup_distant"
'mise à jour ------------------------------------------------------------
'Select Case choix_maj
' Case 1
' Me![info] = "Mise à jour catégories"
' Me.Repaint
' DoCmd.OpenQuery "r_cat_maj_distant"
' Case 2
' Me![info] = "Mise à jour catégories textes"
' Me.Repaint
' DoCmd.OpenQuery "r_cat_lang_maj_distant"
' Case 3
' Me![info] = "Mise à jour fabricants"
' Me.Repaint
' DoCmd.OpenQuery "r_fab_maj_distant"
' Case 4
' Me![info] = "Mise à jour articles"
' Me.Repaint
' DoCmd.OpenQuery "r_ref_maj_distant"
' Case 5
' Me![info] = "Mise à jour articles textes"
' Me.Repaint
' DoCmd.OpenQuery "r_ref_maj_lang_distant"
' Case 6
' Me![info] = "Mise à jour liasons categories articles"
' Me.Repaint
' DoCmd.OpenQuery "r_ref_cat_maj_distant"
'
'
'
' Case 7
' Me![info] = "Mise à jour catégories"
' Me.Repaint
' DoCmd.OpenQuery "r_cat_maj_distant"
'
' Me![info] = "Mise à jour catégories textes"
' Me.Repaint
' DoCmd.OpenQuery "r_cat_lang_maj_distant"
'
' Me![info] = "Mise à jour fabricants"
' Me.Repaint
' DoCmd.OpenQuery "r_fab_maj_distant"
'
' Me![info] = "Mise à jour articles"
' Me.Repaint
' DoCmd.OpenQuery "r_ref_maj_distant"
'
' Me![info] = "Mise à jour articles textes"
' Me.Repaint
' DoCmd.OpenQuery "r_ref_maj_lang_distant"
'
' Me![info] = "Mise à jour liasons categories articles"
' Me.Repaint
' DoCmd.OpenQuery "r_ref_cat_maj_distant"
'
' Case Else
' Me![info] = "Fin !"
' Me.Repaint
'End Select
Me![info] = "Mise à jour catégories"
Me.Repaint
DoCmd.OpenQuery "r_cat_maj_distant"
Me![info] = "Mise à jour catégories textes"
Me.Repaint
DoCmd.OpenQuery "r_cat_lang_maj_distant"
Me![info] = "Mise à jour fabricants"
Me.Repaint
DoCmd.OpenQuery "r_fab_maj_distant"
Me![info] = "Mise à jour articles"
Me.Repaint
DoCmd.OpenQuery "r_ref_maj_distant"
Me![info] = "Mise à jour articles textes"
Me.Repaint
DoCmd.OpenQuery "r_ref_maj_lang_distant"
Me![info] = "Mise à jour liasons categories articles"
Me.Repaint
DoCmd.OpenQuery "r_ref_cat_maj_distant"
Me![info] = "Fin !"
Me.Repaint
Exit_maj_donnees_Click:
Exit Sub
Err_maj_donnees_Click:
MsgBox Err.Description
Resume Exit_maj_donnees_Click
End Sub
Private Sub preparation_locale_Click()
On Error GoTo Err_preparation_locale_Click
Dim bds As Database
Dim table As String
Dim r_table As Recordset
Dim cpt
Dim chaine_esp As String
Dim chaine_rec As String
Dim chaine_tmp As String
Dim sql As String
Dim i
sql = "SELECT First(references.REFERENCE) AS REFERENCEChamps, Count(references.REFERENCE) AS NombreDeDbls " & _
"FROM [References] " & _
"GROUP BY references.REFERENCE " & _
"HAVING (((Count(references.REFERENCE))>1));"
Set bds = CurrentDb
Set r_table = bds.OpenRecordset(sql, dbOpenDynaset)
If r_table.EOF = False Then
MsgBox "Dom, tu as des doublons !!!"
Set r_table = Nothing
Set bds = Nothing
Exit Sub
End If
Set r_table = Nothing
Set bds = Nothing
Me![info] = "Patience ..."
Me.Repaint
'local
DoCmd.OpenQuery "r_cat_conversion_sup" 'vide table cat locale
DoCmd.OpenQuery "r_fab_sup" 'vide fabricants
DoCmd.OpenQuery "r_ref_sup" 'sup donnees ref locales
DoCmd.OpenQuery "r_cat_conversion" 'ajout des données SANS ID
DoCmd.OpenQuery "r_fab_maj" 'ajout données SANS ID
'mise à jour de l'id cat
Set bds = CurrentDb
table = "t_famille_conversion"
Set r_table = bds.OpenRecordset(table, dbOpenDynaset)
cpt = 2
r_table.MoveFirst
Do While Not r_table.EOF
r_table.Edit
r_table![id] = cpt
chaine_esp = r_table![Designation_famille]
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
r_table![Designation_famille] = chaine_esp
' creation lien
chaine_esp = r_table![Designation_famille]
chaine_esp = Replace(chaine_esp, "°", "-")
chaine_esp = Replace(chaine_esp, " ", "-")
chaine_esp = Replace(chaine_esp, "é", "e")
chaine_esp = Replace(chaine_esp, "è", "e")
chaine_esp = Replace(chaine_esp, "ê", "e")
chaine_esp = Replace(chaine_esp, "à", "a")
chaine_esp = Replace(chaine_esp, "ô", "o")
chaine_esp = Replace(chaine_esp, "ç", "c")
chaine_esp = Replace(chaine_esp, "/", "-")
chaine_esp = Replace(chaine_esp, ",", "-")
chaine_esp = Replace(chaine_esp, ".", "-")
chaine_esp = Replace(chaine_esp, "'", "-")
chaine_esp = Replace(chaine_esp, """", "")
chaine_esp = Replace(chaine_esp, "---", "-")
chaine_esp = Replace(chaine_esp, "--", "-")
chaine_esp = Replace(chaine_esp, "(", "")
chaine_esp = Replace(chaine_esp, ")", "")
chaine_esp = Replace(chaine_esp, "§", "s")
' ajout le 21_12_09
chaine_esp = Replace(chaine_esp, "Ö", "O")
chaine_esp = Replace(chaine_esp, "ö", "o")
chaine_esp = Replace(chaine_esp, "Ü", "U")
chaine_esp = Replace(chaine_esp, "ü", "u")
' ajout le 10_06_10
chaine_esp = Replace(chaine_esp, "ï", "i")
chaine_esp = Replace(chaine_esp, "ë", "e")
chaine_esp = Replace(chaine_esp, "î", "i")
chaine_esp = Replace(chaine_esp, "û", "u")
chaine_esp = Replace(chaine_esp, "â", "a")
chaine_esp = Replace(chaine_esp, "ä", "a")
chaine_esp = Replace(chaine_esp, "?", "")
chaine_esp = LCase(chaine_esp)
r_table![link_rewrite] = chaine_esp
' creation meta_desc
chaine_esp = r_table![Designation_famille]
chaine_esp = Replace(chaine_esp, " , ", ", ")
chaine_esp = Replace(chaine_esp, " ", " ")
r_table![meta_description] = chaine_esp
'titre
r_table![meta_title] = r_table![meta_description]
' mots clé
r_table![meta_keywords] = r_table![Designation_famille]
chaine_esp = r_table![meta_keywords]
chaine_esp = Replace(chaine_esp, ".", " ")
chaine_esp = Replace(chaine_esp, ",", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " / ", "/")
chaine_esp = Replace(chaine_esp, " , ", " ")
chaine_esp = Replace(chaine_esp, " ", ", ")
chaine_esp = Replace(chaine_esp, " à, ", "")
chaine_esp = Replace(chaine_esp, " et, ", "")
chaine_esp = Replace(chaine_esp, " de, ", "")
chaine_esp = Replace(chaine_esp, " du, ", "")
chaine_esp = Replace(chaine_esp, " des, ", "")
chaine_esp = Replace(chaine_esp, " au, ", "")
chaine_esp = Replace(chaine_esp, " je, ", "")
chaine_esp = Replace(chaine_esp, " en, ", "")
chaine_esp = Replace(chaine_esp, " d', ", "")
chaine_esp = Replace(chaine_esp, " n°, ", "")
chaine_esp = Replace(chaine_esp, " tout, ", "")
chaine_esp = Replace(chaine_esp, " avec, ", "")
chaine_esp = Replace(chaine_esp, " sans, ", "")
chaine_esp = Replace(chaine_esp, " ex, ", "")
chaine_esp = Replace(chaine_esp, ")", "")
chaine_esp = Replace(chaine_esp, "(", "")
chaine_esp = Replace(chaine_esp, ")", "")
chaine_esp = Replace(chaine_esp, " réf, ", "")
chaine_esp = Replace(chaine_esp, ",", ", ")
chaine_esp = Replace(chaine_esp, " S, §, T, ", " S§T, ")
chaine_esp = Replace(chaine_esp, " j'en, ", "")
chaine_esp = Replace(chaine_esp, " suis, ", "")
chaine_esp = Replace(chaine_esp, """", "")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, "§", "s")
' ajout le 21_12_09
chaine_esp = Replace(chaine_esp, "Ö", "O")
chaine_esp = Replace(chaine_esp, "ö", "o")
chaine_esp = Replace(chaine_esp, "Ü", "U")
chaine_esp = Replace(chaine_esp, "ü", "u")
' ajout le 10_06_10
chaine_esp = Replace(chaine_esp, "ï", "i")
chaine_esp = Replace(chaine_esp, "ë", "e")
chaine_esp = Replace(chaine_esp, "î", "i")
chaine_esp = Replace(chaine_esp, "û", "u")
chaine_esp = Replace(chaine_esp, "â", "a")
chaine_esp = Replace(chaine_esp, "ä", "a")
chaine_esp = Replace(chaine_esp, "?", "")
chaine_esp = LCase(chaine_esp)
r_table![meta_keywords] = chaine_esp
r_table.Update
r_table.MoveNext
cpt = cpt + 1
Loop
'famille pour tous les articles. Famille non active
r_table.AddNew
r_table![Code_famille] = "marc"
r_table![Designation_famille] = "Tous les articles"
r_table![id] = 1000
For i = 3 To 6
r_table.Fields(i) = "neant"
Next i
r_table.Update
Set r_table = Nothing
'Set bds = Nothing
'mise à jour de l'id fab
'Set bds = CurrentDb
table = "t_fabricants"
Set r_table = bds.OpenRecordset(table, dbOpenDynaset)
cpt = 1
r_table.MoveFirst
Do While Not r_table.EOF
r_table.Edit
r_table![id] = cpt
r_table.Update
r_table.MoveNext
cpt = cpt + 1
Loop
Set r_table = Nothing
'Set bds = Nothing
DoCmd.OpenQuery "r_ref_maj" 'ajout donnees locales SANS ID
'mise à jour de l'id ref plus ID
'Set bds = CurrentDb
table = "t_references_conversion"
Set r_table = bds.OpenRecordset(table, dbOpenDynaset)
cpt = 1
r_table.MoveLast
r_table.MoveFirst
pos_tmp = r_table![famille]
pos_cpt = 1
Do While Not r_table.EOF
r_table.Edit
r_table![position] = pos_cpt
r_table![id] = r_table![Reference]
' prix renseignés ou pas
If IsNull(r_table![prix]) Then
r_table![prix] = 0
End If
r_table![prix] = Format(r_table![prix], "###0.00")
If IsNull(r_table![prix]) Or r_table![prix] <= 0 Then
r_table![actif] = 0
Else
r_table![actif] = 1
End If
' chercher qte 0
If IsNull(r_table![qte]) Or r_table![qte] <= 0 Then
r_table![qte] = 0
r_table![actif] = 0
Else
r_table![actif] = 1
End If
' creation lien
chaine_esp = r_table![Description]
' 'ajout 21_12_09
' chaine_esp = Replace(chaine_esp, "Réunion", "R-e-u-n-i-o-n")
' chaine_esp = Replace(chaine_esp, "Reunion", "R-e-u-n-i-o-n")
' chaine_esp = Replace(chaine_esp, "reunion", "r-e-u-n-i-o-n")
' chaine_esp = Replace(chaine_esp, "union", "u-n-i-o-n")
'
' chaine_esp = Replace(chaine_esp, "cascade", "c-a-s-c-a-d-e")
' chaine_esp = Replace(chaine_esp, "Cascade", "C-a-s-c-a-d-e")
chaine_esp = Replace(chaine_esp, "°", "-")
chaine_esp = Replace(chaine_esp, " ", "-")
chaine_esp = Replace(chaine_esp, "é", "e")
chaine_esp = Replace(chaine_esp, "è", "e")
chaine_esp = Replace(chaine_esp, "ê", "e")
chaine_esp = Replace(chaine_esp, "à", "a")
chaine_esp = Replace(chaine_esp, "ô", "o")
chaine_esp = Replace(chaine_esp, "ç", "c")
chaine_esp = Replace(chaine_esp, "/", "-")
chaine_esp = Replace(chaine_esp, ",", "-")
chaine_esp = Replace(chaine_esp, ".", "-")
chaine_esp = Replace(chaine_esp, "'", "-")
chaine_esp = Replace(chaine_esp, """", "")
chaine_esp = Replace(chaine_esp, "---", "-")
chaine_esp = Replace(chaine_esp, "--", "-")
chaine_esp = Replace(chaine_esp, "(", "")
chaine_esp = Replace(chaine_esp, ")", "")
' ajout le 21_12_09
chaine_esp = Replace(chaine_esp, "Ö", "O")
chaine_esp = Replace(chaine_esp, "ö", "o")
chaine_esp = Replace(chaine_esp, "Ü", "U")
chaine_esp = Replace(chaine_esp, "ü", "u")
' ajout le 10_06_10
chaine_esp = Replace(chaine_esp, "ï", "i")
chaine_esp = Replace(chaine_esp, "ë", "e")
chaine_esp = Replace(chaine_esp, "î", "i")
chaine_esp = Replace(chaine_esp, "û", "u")
chaine_esp = Replace(chaine_esp, "â", "a")
chaine_esp = Replace(chaine_esp, "ä", "a")
chaine_esp = Replace(chaine_esp, "?", "")
chaine_esp = LCase(chaine_esp)
r_table![link] = chaine_esp
' creation meta_desc
chaine_esp = r_table![Description]
chaine_esp = Replace(chaine_esp, " , ", ", ")
chaine_esp = Replace(chaine_esp, " ", " ")
r_table![Description] = chaine_esp
r_table![meta_desc] = r_table![Description]
' creation meta_mots
r_table![meta_mots] = r_table![meta_mots] & " " & r_table![Description]
chaine_esp = r_table![meta_mots]
chaine_esp = Replace(chaine_esp, ".", " ")
chaine_esp = Replace(chaine_esp, ",", " ")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, " / ", "/")
chaine_esp = Replace(chaine_esp, " , ", " ")
chaine_esp = Replace(chaine_esp, " ", ", ")
chaine_esp = Replace(chaine_esp, " à, ", "")
chaine_esp = Replace(chaine_esp, " et, ", "")
chaine_esp = Replace(chaine_esp, " de, ", "")
chaine_esp = Replace(chaine_esp, " du, ", "")
chaine_esp = Replace(chaine_esp, " des, ", "")
chaine_esp = Replace(chaine_esp, " au, ", "")
chaine_esp = Replace(chaine_esp, " je, ", "")
chaine_esp = Replace(chaine_esp, " en, ", "")
chaine_esp = Replace(chaine_esp, " d', ", "")
chaine_esp = Replace(chaine_esp, " n°, ", "")
chaine_esp = Replace(chaine_esp, " tout, ", "")
chaine_esp = Replace(chaine_esp, " avec, ", "")
chaine_esp = Replace(chaine_esp, " sans, ", "")
chaine_esp = Replace(chaine_esp, " ex, ", "")
chaine_esp = Replace(chaine_esp, ")", "")
chaine_esp = Replace(chaine_esp, "(", "")
chaine_esp = Replace(chaine_esp, ")", "")
chaine_esp = Replace(chaine_esp, " réf, ", "")
chaine_esp = Replace(chaine_esp, ",", ", ")
chaine_esp = Replace(chaine_esp, " S, §, T, ", " S§T, ")
chaine_esp = Replace(chaine_esp, " j'en, ", "")
chaine_esp = Replace(chaine_esp, " suis, ", "")
chaine_esp = Replace(chaine_esp, """", "")
chaine_esp = Replace(chaine_esp, " ", " ")
chaine_esp = Replace(chaine_esp, "§", "s")
r_table![meta_mots] = chaine_esp
' creation meta_titre
r_table![meta_tittle] = r_table![meta_desc]
r_table.Update
r_table.MoveNext
If r_table.EOF = False Then
If r_table![famille] <> pos_tmp Then
pos_cpt = 1
pos_tmp = r_table![famille]
Else
pos_cpt = pos_cpt + 1
End If
cpt = cpt + 1
End If
Loop
Set r_table = Nothing
Set bds = Nothing
'requetes mise à jour des tables pour export
'fab
sql = "DELETE t_distant_fabricants.* FROM t_distant_fabricants;"
DoCmd.RunSQL sql
DoCmd.OpenQuery "r_fab_maj_EXP"
'cat
sql = "DELETE t_distant_categories.* FROM t_distant_categories;"
DoCmd.RunSQL sql
sql = "DELETE t_distant_categories_textes.* FROM t_distant_categories_textes;"
DoCmd.RunSQL sql
DoCmd.OpenQuery "r_cat_maj_EXP"
DoCmd.OpenQuery "r_cat_lang_maj_EXP"
'prod
sql = "DELETE t_distant_produits.* FROM t_distant_produits;"
DoCmd.RunSQL sql
sql = "DELETE t_distant_produits_textes.* FROM t_distant_produits_textes;"
DoCmd.RunSQL sql
DoCmd.OpenQuery "r_ref_maj_EXP"
DoCmd.OpenQuery "r_ref_maj_lang_EXP"
'lien prod cat
sql = "DELETE t_distant_categories_produits.* FROM t_distant_categories_produits;"
DoCmd.RunSQL sql
DoCmd.OpenQuery "r_ref_cat_maj_EXP"
'lien prod cat pour tous les produits
DoCmd.OpenQuery "r_ref_cat_maj_TLA_EXP"
Me![info] = "Fin de la procédure"
Me.Repaint
Exit_preparation_locale_Click:
Exit Sub
Err_preparation_locale_Click:
MsgBox Err.Description
Resume Exit_preparation_locale_Click
End Sub
Private Sub sauve_donnees_images_Click()
On Error GoTo Err_sauve_donnees_images_Click
Dim sql As String
sql = "DELETE t_images.* FROM t_images;"
DoCmd.RunSQL sql
sql = "DELETE t_images_lang.* FROM t_images_lang;"
DoCmd.RunSQL sql
sql = "INSERT INTO t_images ( id_image, id_product, [position], cover ) " & _
"SELECT dom_ps_image.id_image, dom_ps_image.id_product, dom_ps_image.position, dom_ps_image.cover " & _
"FROM dom_ps_image;"
DoCmd.RunSQL sql
sql = "INSERT INTO t_images_lang ( id_image, id_lang, legend ) " & _
"SELECT dom_ps_image_lang.id_image, dom_ps_image_lang.id_lang, dom_ps_image_lang.legend " & _
"FROM dom_ps_image_lang;"
DoCmd.RunSQL sql
Exit_sauve_donnees_images_Click:
Exit Sub
Err_sauve_donnees_images_Click:
MsgBox Err.Description
Resume Exit_sauve_donnees_images_Click
End Sub
Private Sub Commande31_Click()
On Error GoTo Err_Commande31_Click
DoCmd.OpenQuery "r_cpt_img"
Exit_Commande31_Click:
Exit Sub
Err_Commande31_Click:
MsgBox Err.Description
Resume Exit_Commande31_Click
End Sub |
Partager