View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Madhan Madhan is offline
external usenet poster
 
Posts: 78
Default Update current record in Access using Excel

Hi, the following piece of code will help you to update the name in a for a
given ID.

Const DSN As String = "ODBC;DATABASE=myDB;UID=;PWD=;DSN=DSN_TEST;"
Dim ws As DAO.Workspace
Dim con As DAO.Connection

Set ws = DAO.CreateWorkspace("", "", "", dbUseODBC)
Set con = ws.OpenConnection(DSN, dbDriverNoPrompt, False)
query = "UPDATE Map_Project_Resource SET NAME='madhan' WHERE ID='E001';"
con.Execute query
con.Close
ws.Close


"Noemi" wrote:

Hi
Would someone be able to help me with the code to use to find a record in an
access table so I can update data for that record using information in an
excel spreadsheet.

Thanks
Noemi