Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Line Wrap Problem

I have the following code which works, but is hard to read. Can someone
help with line wrap.

..CommandText = Array( _
"SELECT tbl_TimeSlips1.Year, tbl_TimeSlips1.Month,
tbl_TimeSlips1.Week, tbl_ISProjects.Description, tbl_ISPersonnel.Name,
tbl_ISPersonnel.Department, tbl_ISProjects.GLCode,
tbl_ISProjects.GLSubCode, tb" _
, _
"l_TimeSlips1.Hours, tbl_ISPersonnel.Rate, tbl_TimeSlips1.GL,
tbl_TimeSlips1.ContractorCode, tbl_TimeSlips1.ContractorName,
tbl_TimeSlips1.Charged, tbl_TimeSlips1.Notes, tbl_ISProjects.RecordID,
tbl_IS" _
, _
"Projects.Department, tbl_ISProjects.Capitalized,
tbl_ISProjects.Total, tbl_ISPersonnel.RecordID, tbl_ISPersonnel.Status"
& Chr(13) & "" & Chr(10) & "FROM Intranet.dbo.tbl_ISPersonnel
tbl_ISPersonnel, Intranet.dbo.tbl_ISProjects " _
, _
"tbl_ISProjects, Intranet.dbo.tbl_TimeSlips1 tbl_TimeSlips1" &
Chr(13) & "" & Chr(10) & "WHERE tbl_TimeSlips1.ContractorCode =
tbl_ISPersonnel.RecordID AND tbl_TimeSlips1.GL =
tbl_ISProjects.RecordID AND ((tbl_TimeSlips1.Year=200" _
, _
"6) AND (tbl_TimeSlips1.Month=1) AND (tbl_TimeSlips1.Hours0)
AND (tbl_ISProjects.Capitalized=1) AND
(tbl_ISPersonnel.Status='Associate'))" _
)

TIA

Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Line Wrap Problem

You can remove all of the chr() text unless you need to print this out.

Line continuation in VB[A] uses "_"

"SELECT tbl_TimeSlips1.Year, tbl_TimeSlips1.Month,tbl_TimeSlips1.Week, " & _
" tbl_ISProjects.Description, tbl_ISPersonnel.Name, " & _
" tbl_ISPersonnel.Department, tbl_ISProjects.GLCode, " & _
" tbl_ISProjects.GLSubCode, tb" & _
'etc etc

No idea why the original code has that in an array though.

Tim

--
Tim Williams
Palo Alto, CA


"GregR" wrote in message
oups.com...
I have the following code which works, but is hard to read. Can someone
help with line wrap.

.CommandText = Array( _
"SELECT tbl_TimeSlips1.Year, tbl_TimeSlips1.Month,
tbl_TimeSlips1.Week, tbl_ISProjects.Description, tbl_ISPersonnel.Name,
tbl_ISPersonnel.Department, tbl_ISProjects.GLCode,
tbl_ISProjects.GLSubCode, tb" _
, _
"l_TimeSlips1.Hours, tbl_ISPersonnel.Rate, tbl_TimeSlips1.GL,
tbl_TimeSlips1.ContractorCode, tbl_TimeSlips1.ContractorName,
tbl_TimeSlips1.Charged, tbl_TimeSlips1.Notes, tbl_ISProjects.RecordID,
tbl_IS" _
, _
"Projects.Department, tbl_ISProjects.Capitalized,
tbl_ISProjects.Total, tbl_ISPersonnel.RecordID, tbl_ISPersonnel.Status"
& Chr(13) & "" & Chr(10) & "FROM Intranet.dbo.tbl_ISPersonnel
tbl_ISPersonnel, Intranet.dbo.tbl_ISProjects " _
, _
"tbl_ISProjects, Intranet.dbo.tbl_TimeSlips1 tbl_TimeSlips1" &
Chr(13) & "" & Chr(10) & "WHERE tbl_TimeSlips1.ContractorCode =
tbl_ISPersonnel.RecordID AND tbl_TimeSlips1.GL =
tbl_ISProjects.RecordID AND ((tbl_TimeSlips1.Year=200" _
, _
"6) AND (tbl_TimeSlips1.Month=1) AND (tbl_TimeSlips1.Hours0)
AND (tbl_ISProjects.Capitalized=1) AND
(tbl_ISPersonnel.Status='Associate'))" _
)

TIA

Greg



Reply
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
Wrap text creates an extra line Arun Excel Discussion (Misc queries) 7 September 25th 08 01:28 AM
Line Wrap in Axis Tick Labels Mike Hogan Excel Discussion (Misc queries) 0 June 27th 06 02:21 PM
Wrap a command line string Stuart[_21_] Excel Programming 4 May 15th 05 02:31 PM
In Excel, using line wrap with text, some cells will appear as ##. RSCoyner Excel Discussion (Misc queries) 4 January 19th 05 11:21 PM
how can I wrap text from one line to another? gabalex Excel Worksheet Functions 5 December 17th 04 03:13 PM


All times are GMT +1. The time now is 03:51 PM.

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

About Us

"It's about Microsoft Excel"