If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Can't "clean up" macro recorder Access query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-04, 21:07
Autoworker Autoworker is offline
Registered User
 
Join Date: Feb 2004
Posts: 1
Can't "clean up" macro recorder Access query

Trying to clean up an Excel macro that querys an Access db. There is an extra comma I don't understand. The recored macro works fine. I want to clean it up because the macro will be modified to loop through various querys.

I was able to clean it up to this point:

"AND (`Daily Production Counts`.intShi", "ft=1) " & _
"AND (`Daily Production Counts`.PartNumber In ('52101-02020','52159-02270'))")

It works with the comma in the middle of the field name and the recored macro put the comma in the field.

but when I try and clean it up to this, the macro fails:

"AND (`Daily Production Counts`.intShift=1) " & _
"AND (`Daily Production Counts`.PartNumber In ('52101-02020','52159-02270'))")

The orginal macro had .intShift=1 spread across two rows. I guess I don't understand VBA rules for putting a field name across two lines.
Reply With Quote
Reply

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On