VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4980
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6975
   LinkTopic       =   "Form1"
   ScaleHeight     =   4980
   ScaleWidth      =   6975
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text2 
      Height          =   525
      Left            =   1590
      TabIndex        =   2
      Text            =   "Upto"
      Top             =   1290
      Width           =   1245
   End
   Begin VB.TextBox Text1 
      Height          =   525
      Left            =   1650
      TabIndex        =   1
      Text            =   "FormName"
      Top             =   450
      Width           =   2985
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   2520
      TabIndex        =   0
      Top             =   3120
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Open "C:\TT.TXT" For Output As #1
        For I = 1 To Val(Text2)
            Print #1, "INSERT INTO FIRM_ADDLESS_DETAIL SELECT  '" & Format(I, "000000") & "',FormName,SrNo,FldName,FldPerc,FldAddLess, FldPercMulti,FldRound,FldFormula,AccEff,EffAcc,0 FROM ADDLESS_DETAIL WHERE FormName = '" & UCase(Text1) & "'"
        Next
    Close #1
End Sub
