LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Export from Excel to Access ADODB

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Export from Access to Excel Teresa NS Excel Discussion (Misc queries) 2 December 2nd 08 06:46 PM
access database (adodb)from excel vba AskExcel Excel Worksheet Functions 0 July 17th 06 02:01 AM
Export to Access from Excel Secret Squirrel Excel Discussion (Misc queries) 0 February 7th 06 11:44 PM
export access to excel. change access & update excel at same time fastcar Excel Discussion (Misc queries) 0 June 24th 05 09:27 PM
Export from Access to Excel Sabina Excel Discussion (Misc queries) 3 February 23rd 05 09:56 PM


All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"