Type Mismatch Error in Access 2003

N

NJ

Dim dbNewdb As DAO.Database
Dim rdcDept As DAO.Recordset
Dim sSQL As String
sbudget = "111aaa"
saccount = "222bbb"

sSQL = "insert into MyTable(Account, Budget) values('" & sAccount & "',
'" & sBudget & "')"

Set dbNewdb = CurrentDb
DoCmd.RunCommand sSQL
rdcDept.Close
 
O

Ofer Cohen

Are both fields Account, Budget are text type fields?
If any of them is a number type, then you can get this error.
 
Top