A
Andy G
I have an .ADP with a SQL backend. I made a simple little form that gets
the table name, workbook name, and worksheet name from the user and the
click a button to import a spreadsheet into an existing table. I'm getting
the error, "You tried to assign the Null value to a variable that is not a
Variant data type". The spreadsheet I am trying to import has one column
with values and a header. The table has one column and is defined varchar
100 not null default ' '. Thanks for any help.
Dim table As String
Dim workbook As String
Dim worksheet As String
table = "dbo." & Me![cmbTblName]
workbook = "H:\DS Clients\CFSPH\Data\" & Me![txtWrkbName] & ".xls"
worksheet = Me![txtWrksName]
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, table,
workbook, True, worksheet & "!"
Andy
the table name, workbook name, and worksheet name from the user and the
click a button to import a spreadsheet into an existing table. I'm getting
the error, "You tried to assign the Null value to a variable that is not a
Variant data type". The spreadsheet I am trying to import has one column
with values and a header. The table has one column and is defined varchar
100 not null default ' '. Thanks for any help.
Dim table As String
Dim workbook As String
Dim worksheet As String
table = "dbo." & Me![cmbTblName]
workbook = "H:\DS Clients\CFSPH\Data\" & Me![txtWrkbName] & ".xls"
worksheet = Me![txtWrksName]
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, table,
workbook, True, worksheet & "!"
Andy