---Soumis par Dev Ashish---
Exécuter un wizard (assistant) depuis le code.
La plupart des wizards d'Access peuvent être utilisé, depuis le code, en autant qu'on utilise une référence appropriée. Pour les exemples qui suivent, veillez d'abord
Assurément, cette méthode s'applique également aux "Add-ins". La seule chose que vous avez à faire est d'identifier le point d'entrée et de comprendre les arguments requis.
CECI N'EST APPLIQUABLE QU'À LA VERSION COMPLÈTE, NON À LA VERSION RUNTIME.
Pour trouver d'autres fonction dans les wizards, simpement cocher la bibliothèque appropriée dans le Object Browser (clé de fonction F2).
Voici quelques très simples exemples pour se faire la main:
Résolution de conflits de replication ?wzcnf80.cnf_Entry
CrossTab Query Wizard ?wzmain80.xtq_Entry
Table Wizard ?wzmain80.tw_Entry
Simple query wizard ?wzmain80.ssq_Entry
Switchboard manager ?wzmain80.sbm_Entry
Pivot Table wizard ?wzmain80.pvt_Entry(strSourceTable as string)
Publish to the Web wizard call wzmain80.pub_StartWiz
Mailmerge Wizard ?wzmain80.pm_entry(strSourceTableQuery as string)
Label Wizard ?wzmain80.mlbl_Entry(strSourceTable as string)
Add-in Manager ?wztool80.wm_Entry
Table Analyzer ?wztool80.zw_NormalizerEntry
Forms Wizard ?wzmain80.frui_entry(strTableQuery as string, intObjectType as integer) ou ?wzmain80.frui_entry("Orders", acForm)
Query Wizard ?wzmain80.frui_entry(strTableQuery as string, intObjectType as integer) or ?wzmain80.frui_entry("Orders", acQuery)
Reports Wizard ?wzmain80.frui_entry(strTableQuery as string, intObjectType as integer) or ?wzmain80.frui_entry("Orders", acReport)
Unmatched query wizard ?wztool80.dwz_entry
Linked Table Manager ?wztool80.att_Entry
Chart Wizard ?wzTool80.cw_wizardentry(strSource as string, intObjectType as integer, iUnused as integer) ou ?wzTool80.cw_wizardentry("Orders",acTable,0)
Print Security ?wzTool80.Doc_printsec
Database Documentor ?wzTool80.Doc_PrintDatabase
Get Unique name of object ?wzmain80.wlib_stUniqueDocName(strInitName as string,intObjectType as integer) ou ?wzmain80.wlib_stUniquedocname("form1",acForm)
Parser ?wzlib80.wlib_ParseFullPath(stPath As String, stDrive As String, stDir As String, stFName As String, stExt As String) or '********* Code Start ********* Function fParseStuff() Dim strPath As String, strDrive As String Dim strDir As String, strFileName As String Dim strExt As String Call wzlib80.wlib_ParseFullPath(CurrentDb.Name, _ strDrive, _ strDir, _ strFileName, _ strExt) Debug.Print strDrive, strDir, strFileName, strExt End Function '********* Code End *********