Pls urgent....
thank for ur response....
this is my coding...
Option Compare Database
Option Explicit
'Public Sub Main()
'ExportDatabaseObjects()
'End Sub
'Public Sub ExportDatabaseObjects()
Public Sub Main()
On Error GoTo Err_ExportDatabaseObject
Dim db As Database
'Dim db As DAO.Database
Dim td As TableDef
'Dim d As Document
'Dim c As Container
Dim i As Integer
'Dim pipes() As String
Dim sExportLocation As String
Set db = CurrentDb()
sExportLocation = "N:\- Guest -\guestbcs\usrPrivate\irni\text file\"
For Each td In db.TableDefs 'Tables
If Left(td.Name, 4) <> "MSys" Then
DoCmd.TransferText acExportDelim, , td.Name, sExportLocation & td.Name & ".txt", True
DoCmd.RunMacro "table_name"
End If
Next td
For i = 0 To db.QueryDefs.Count - 1
Application.SaveAsText acQuery, db.QueryDefs(i).Name, sExportLocation & db.QueryDefs(i).Name & ".txt"
Next i
Set db = Nothing
MsgBox "All table been exported as a text file to " & sExportLocation, vbInformation
Exit_ExportDatabaseObjects:
Exit Sub
Err_ExportDatabaseObjects:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_ExportDatabaseObjects
End Sub
when i run this program error : "Label not defined come out"
it hightlight at line On Error GoTo Err_ExportDatabaseObject...
pls help me....................