Hi,
I'm wish to export a table using the same export function that exists already in the Access program. Below is the code that defines the export function. How should I modify it so that it will also export another table name "td03_clients"?
From the code above, the part in bold refers another existing module(Dim glNomTableContratIo As String). Would I need to include a new global variable like "Dim glNomTableClientIo as String" too?
Thank you in advance!
I'm wish to export a table using the same export function that exists already in the Access program. Below is the code that defines the export function. How should I modify it so that it will also export another table name "td03_clients"?
Code:
Public Sub ExportData(repertoireExport As String, NomFichierExport As String)
On Error GoTo Err_Sub
Dim stSql As String
Dim repertoire, fichier
Dim nomBaseExport As String
'contrat
If VerifObjet([b]glNomTableContratIo[/b]) = True Then
DoCmd.DeleteObject acTable, glNomTableContratIo
End If
stSql = "SELECT tc01_Contrats.* INTO " & glNomTableContratIo & " FROM tc01_Contrats WHERE ((([tc01_Contrats].[Top_Export])= Yes));"
ExecuteSql (stSql)
From the code above, the part in bold refers another existing module(Dim glNomTableContratIo As String). Would I need to include a new global variable like "Dim glNomTableClientIo as String" too?
Thank you in advance!