-
Record Macro won't complete query lenth
I want to make my query dynamic and use cells as the date parameter. When I go to record the macro though, the query seems to be too long to record. I had this working in another file, and Im not quite sure how to write the rest out?? Is there an easier way to do this?
-
what do the chr(10) an chr(13) do ?
[vba]
..."SELECT"&chr(13)&""&chr(10)&...
[/vba]
I think if I can figure this part out, I should be able to finish writing the query myself in vba.
-
-
1355 with spaces, 1,294 without.
-
Here is an example of how I am trying to do it ...
[vba]
.CommandText = Array( _
"SELECT" & vbCrLf & _
"a.itemA,a.itemB,a.itemC,a.itemA,a.ItemD,a.ItemE,a.ItemF," &vbCrLf& _ a.ItemG,a.ItemH,a.ItemI," & vbCrLf & _
"a.itemJ,a.itemK,a.itemL,a.itemM..." & vbCrLf & _
[/vba] etc.
The table has many fields I require (about 30, then about 20 + in the group by clause, but the table just has too many fields (200 +) to pull the whole thing back. That is why it is so long.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules