Invalid field data type error

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top