Question : Inserting a record

I am trying to insert clientId from an unbound form into sql server table.  I am getting an error that odbc failed.  Please look at the attached document.  It shows where my problem is.  I appreciate your help.

Answer : Inserting a record

From VBA Help -- AddNew
Note To add, edit, or delete a record, there must be a unique index on the record in the underlying data source.  If not, a "Permission denied" error will occur on the AddNew, Delete, or Edit method call in a Microsoft Jet workspace, or an "Invalid argument" error will occur on the Update call in an ODBCDirect workspace.


Also, I think you need to specify the DAO recordset object as a dynaset when editing linked tables
Set rsClient = CurrentDb.OpenRecordset("dbo_tblClient", dbOpenDynaset)

OM Gang
Random Solutions  
 
programming4us programming4us