Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 11th, 2008, 08:47 AM
Registered User
Join Date: Jun 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Syntax in VBA?

I'm trying to update some data from one Excel workbook to another using the Jet driver and I'm having a problem updating multiple fields.

Here is the SQL Statement:

UPDATE [Sheet1$] SET Active='Y', Act_Perf_ID='TESTID' WHERE Analyst ='TEST'

This works fine when I only update one data field, but adding a second field seems to be causing a problem. Any help would be appreciated.

Also, is it possible to query mulitple sheets using one SQL string.

Example:"SELECT * FROM [Sheet1$], [Sheet2$] WHERE [Sheet1$].Analyst='Test' AND [Sheet2$].Analyst='Test'

When I pass the string above, I keep gettting an error as well.

Thanks again.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vba Consolidate Syntax grouth Excel VBA 3 September 29th, 2006 07:37 PM
Fields object syntax in VBA query stepdev Access VBA 11 March 3rd, 2006 04:53 PM
How can use sql syntax in excel vba Biggladius Excel VBA 4 October 6th, 2004 04:15 AM
help with VBA syntax jacqui Excel VBA 0 January 12th, 2004 02:08 PM
Word VBA Syntax Needed SerranoG VB How-To 4 October 28th, 2003 02:16 PM

All times are GMT -4. The time now is 07:51 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.