![]() |
table is be or not be
the following data is be in [a2:c2] row in the current sheet.
dbtext, dbdate, dblong by the way, the following below, the source code don't work. i want to charater to integer. Sub sbSqlTblMak(srAcesPat, tblNam, sht, aFildType) Dim tbl As DAO.TableDef Set dbAces = OpenDatabase(srAcesPat) Set tbl = dbAces.CreateTableDef(tblNam) For i = 0 To UBound(aFildType) tbl.Fields.Append tbl.CreateField(sht.Cells(1, i + 1), aFildType(i)) Next dbAces.TableDefs.Append tbl End Sub Sub sbSqlTblMak_tst() dbAcesPat = "c:\xl\dev\dbOK.mdb" namTbl = "tblX" Dim ary(2) For i = 0 To 2 ary(i) = CLng(ActiveSheet.Cells(2, i + 1).value) Next Call sbSqlTblMak(dbAcesPat, namTbl, ActiveSheet, ary) End Sub *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 07:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com