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. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Horizontal lines per column on page
-- MADBLover "Marshall Barton" wrote: JoJo wrote: Thanks Marsh for your help!!! It looks like the ="Week" & DatePart is just what is needed. As far as the horizontal lines I need fourteen so just drawing them above the field in the detail section will only give me lines until the section runs out. Below is a concoction from examining what you gave me and some other line methods, it seems to be working pretty good(learning is an exciting adventure ?!!) The thing is, you may have been trying to tell me this all along but I am still learning and don't really understand the code being given me until it is applied a few times. (P.S. If the code below looks like too much and there's a shorter way, I don't doubt there is, then please teach me some more!!! Thank you!!!) Dim intNumLines As Integer Dim intLineNum As Integer Dim intDetailHeight As Integer Dim intPageHeadHeight As Integer On Error GoTo Report_Page_Error intNumLines = 14 intDetailHeight = Me.Section(acDetail).Height intPageHeadHeight = Me.Section(3).Height For intLineNum = 1 To intNumLines Me.Line (0 * 1440, 3700)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, 3700)-Step(3.85 * 1440, 0) Me.Line (0 * 1440, 3950)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, 3950)-Step(3.85 * 1440, 0) Me.Line (0 * 1440, 4200)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, 4200)-Step(3.85 * 1440, 0) Me.Line (0 * 1440, 4450)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, 4450)-Step(3.85 * 1440, 0) Me.Line (0 * 1440, 4685)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, 4685)-Step(3.85 * 1440, 0) Me.Line (0 * 1440, 4930)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, 4930)-Step(3.85 * 1440, 0) Me.Line (0 * 1440, 5165)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, 5165)-Step(3.85 * 1440, 0) Next This should be close to a shorter version: Dim intNumLines As Integer Dim intLineNum As Integer Dim intDetailHeight As Integer Dim intPageHeadHeight As Integer Dim lng1stDetail As Long Dim lngVPos As Long On Error GoTo Report_Page_Error intNumLines = 14 intDetailHeight = Me.Section(acDetail).Height intPageHeadHeight = Me.Section(3).Height lng1stDetail = 3700 ' intDetailHeight + intPageHeadHeight For intLineNum = 0 To intNumLines - 1 lngVPos = lng1stDetail + intLineNum * intDetailHeight Me.Line (0 * 1440, lngVPos)-Step(3.58 * 1440, 0) Me.Line (3.85 * 1440, lngVPos)-Step(3.58 * 1440, 0) Next -- Marsh MVP [MS Access] Oh yeah! The shortest route is a straight line (pun intended)!! That saved me from writing about 14 or more lines of code. Thank you!! I'm still having problems with the Week 1 in the 1st column and Week 2 in the second column. What happened with the info you gave me about =DatePart etc... is that Week 1 ends up in column two and Week 2 goes to the next page. I must be doing something wrong but there are so many details I'm not sure what it could be. If you think of something and I'm sure you will, please let me know. I'm not giving you much to go on am I? I'll be glad when I can start taking classes on this. Until then thanks for your patience and helping me see this through. |
#12
|
|||
|
|||
Horizontal lines per column on page
JoJo wrote:
Oh yeah! The shortest route is a straight line (pun intended)!! That saved me from writing about 14 or more lines of code. Thank you!! I'm still having problems with the Week 1 in the 1st column and Week 2 in the second column. What happened with the info you gave me about =DatePart etc... is that Week 1 ends up in column two and Week 2 goes to the next page. Let's see if we can get the first week in the first column. If you have the report header section, remove it, make its Height 0, or make it invisible. If that doesn't help, then try clearing the week group header section's NewRowOrCol property and set the group footer section's property to After Section. -- Marsh MVP [MS Access] |
#13
|
|||
|
|||
Horizontal lines per column on page
-- MADBLover "Marshall Barton" wrote: JoJo wrote: Oh yeah! The shortest route is a straight line (pun intended)!! That saved me from writing about 14 or more lines of code. Thank you!! I'm still having problems with the Week 1 in the 1st column and Week 2 in the second column. What happened with the info you gave me about =DatePart etc... is that Week 1 ends up in column two and Week 2 goes to the next page. Let's see if we can get the first week in the first column. If you have the report header section, remove it, make its Height 0, or make it invisible. If that doesn't help, then try clearing the week group header section's NewRowOrCol property and set the group footer section's property to After Section. -- Marsh MVP [MS Access] YeeHah!!! Yeah!!! Joy!!! Hurray!!!! That did it!!!! Thank you, thank you, thank you. A million times thank you!!!!! It works perfectly, of course. Until the next time, have a great day and thank you bunches. |
|
Thread Tools | |
Display Modes | |
|
|