erin_0502
07-25-2007, 06:49 PM
hello friends..............
anybody help me...
i get error "Label not defined" when i compile my coding...
what the step that i can solve this problem???????????
boblarson
07-25-2007, 06:56 PM
Take a deep breath, step back and type out the EXACT error message and if you click the Debug button on the dialog, which line does it highlight?
erin_0502
07-25-2007, 07:22 PM
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....................
You are missing an "s" at the end of the line, it should be
On Error GoTo Err_ExportDatabaseObjects
erin_0502
07-26-2007, 04:35 PM
thank....
now i can run without error...