Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please see reply to later thread you started on this subject.
-- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Since no answeres yet, I've been working with sql queries trying to fix that. Dunno if someone knows about queries in VBA but here we go... sql = "SELECT * FROM Sección WHERE courseno = '" & Range("Información!B4").Value & "'" Set rs = cn.Execute(sql) [COLOR = red] If Not rs.EOF Then 'No existe sql = "UPDATE Sección SET section = '" & Range("Información!B3").Value & "' WHERE courseno = '" & Range("Información!B4").Value & "'" MsgBox sql Set rs = cn.Execute(sql) The first query (select) works fine but when trying to do the Update query it always give me a syntax error. It seems like a right writen query to me. Same happens with this query: [COLOR = red]sql = "INSERT INTO Sección (courseno,section) VALUES('" & Range("Información!B4").Value & "','" & Range("Información!B3").Value & "'" Set rs = cn.Execute(sql)[/color] Any Idea? --- Message posted from http://www.ExcelForum.com/[/color] |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Export from Access to Excel | Excel Discussion (Misc queries) | |||
access database (adodb)from excel vba | Excel Worksheet Functions | |||
Export to Access from Excel | Excel Discussion (Misc queries) | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) | |||
Export from Access to Excel | Excel Discussion (Misc queries) |