adding a new feild in a module

canberry

Registered User.
Local time
Today, 13:20
Joined
Sep 22, 2008
Messages
36
Hi all. Is it possible to add a feild in a module and specify what u want the value to be. EG. If there are 5 rows of data being imported. I would like to add a new feild to these 5 records storing (eg) '341' for all 5 records. I pasted my code below so u could advice me what to do if it is possible.

Option Compare Database
Dim DB As Database
Dim GL As Recordset
Dim SQLStatement As String
Dim CC As Recordset
Dim TM As Recordset
Dim FilePath As String
Function Import ABFileTable()
Set DB = CurrentDb
With Application.FileSearch
.LookIn = "C:\Documents and Settings\My Documents\02262009\ABNOW\"
.FileName = "AB*.txt"
If .Execute(msoSortByFileName, msoSortOrderAscending) > 0 Then
For i = 1 To .FoundFiles.Count
FilePath = .FoundFiles(i)
DoCmd.TransferText acImportFixed, "ABFile Export Specification", "ABFileTable", [FilePath]
Next i
End If
End With
End Function
 
I would suggest doing a search on ALTER TABLE SQL syntax.
 

Users who are viewing this thread

Back
Top Bottom