T
Tcs
I'm getting an error, and can't figure out why. Might you know?
Private Function fncCreateTable(objMyTempDbs As Database, strMyTempDbs As
String)
On Error GoTo Err_fncCreateTable
Dim objDAOdbs1 As Database
Dim MyTabledef As TableDef
Set objDAOdbs1 = OpenDatabase(strMyTempDbs)
Set MyTabledef = objDAOdbs1.CreateTableDef("tblAcctsRecAging_Details")
MyTabledef.SourceTableName = "tblAcctsRecAging_Details"
With MyTabledef
.Fields.Append .CreateField("CustID")
End With
' Add table to the collection.
objDAOdbs1.TableDefs.Append MyTabledef <<--
objDAOdbs1.Close
Set objDAOdbs1 = Nothing
Exit_fncCreateTable:
On Error Resume Next
SysCmd acSysCmdClearStatus
Exit Function
Err_fncCreateTable:
MsgBox "Error # " & Err.Number & " was generated by " & Err.Source & vbCrLf
& _
Err.Description, , "RunJob - fncCreateTable - " & Date & " - " &
Time
' intRunJobLElecRpt4Andy = False
Resume Exit_fncCreateTable
End Function
Error #3259 was generated by DAO.TableDef
Invalid field data type.
(Access 2000).
Thanks in advance,
Tom
Private Function fncCreateTable(objMyTempDbs As Database, strMyTempDbs As
String)
On Error GoTo Err_fncCreateTable
Dim objDAOdbs1 As Database
Dim MyTabledef As TableDef
Set objDAOdbs1 = OpenDatabase(strMyTempDbs)
Set MyTabledef = objDAOdbs1.CreateTableDef("tblAcctsRecAging_Details")
MyTabledef.SourceTableName = "tblAcctsRecAging_Details"
With MyTabledef
.Fields.Append .CreateField("CustID")
End With
' Add table to the collection.
objDAOdbs1.TableDefs.Append MyTabledef <<--
objDAOdbs1.Close
Set objDAOdbs1 = Nothing
Exit_fncCreateTable:
On Error Resume Next
SysCmd acSysCmdClearStatus
Exit Function
Err_fncCreateTable:
MsgBox "Error # " & Err.Number & " was generated by " & Err.Source & vbCrLf
& _
Err.Description, , "RunJob - fncCreateTable - " & Date & " - " &
Time
' intRunJobLElecRpt4Andy = False
Resume Exit_fncCreateTable
End Function
Error #3259 was generated by DAO.TableDef
Invalid field data type.
(Access 2000).
Thanks in advance,
Tom