Access.2007.VBA.Bibl..

(John Hannent) #1
intFileType = Nz(Me![fraFileType].Value, 1)

Select Case intFileType

Case 1

dBASE


strTable = “tblNewJobsDB”
Debug.Print “DB Path: “ & strDBPath
Debug.Print “DB Name: “ & strDBName
DoCmd.TransferDatabase transfertype:=acImport, _
databasetype:=”dBASE IV”, _
databasename:=strDBPath, _
objecttype:=acTable, _
Source:=strDBName, _
Destination:=strTable, _
structureonly:=False

Assign the appropriate form as the subform’s source object.


Me![subNewJobs].SourceObject = “fsubNewJobsDB”

Case 2

Paradox


strTable = “tblNewJobs”
DoCmd.TransferDatabase transfertype:=acImport, _
databasetype:=”Paradox 4.X”, _
databasename:=strDBPath, _
objecttype:=acTable, _
Source:=strDBName, _
Destination:=strTable, _
structureonly:=False

Assign the appropriate form as the subform’s source object.


Me![subNewJobs].SourceObject = “fsubNewJobs”

Case 3

Lotus 1-2-3


strTable = “tblNewJobs”
DoCmd.TransferSpreadsheet transfertype:=acImport, _
spreadsheettype:=acSpreadsheetTypeLotusWK3, _
TableName:=strTable, _
FileName:=strAppFileAndPath, _
hasfieldnames:=True

Working with External Data 10

Free download pdf