design question

kavarin

Registered User.
Local time
Today, 05:11
Joined
Apr 4, 2002
Messages
60
My question is (I hope) fairly straight forward:

I want lines around each field within my report. Basically I want the data to be similar to a datasheet (with the lines around each field, like a chart)
That way data is more easily read accross the report? Any way to do this?
 
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim CtlDetail As Control
Dim intLineMargin As Integer


intLineMargin = 60


For Each CtlDetail In Me.Section(acDetail).Controls
With CtlDetail

Me.Line ((.left + .Width + intLineMargin), 0)-(.left + .Width + _
intLineMargin, Me.Height)

End With
Next
With Me
Me.Line (0, 0)-Step(.Width, .Height), 0, B
End With

Set CtlDetail = Nothing

End Sub
 
Looks great :-)

But unfortunately, I do not have a grasp on SQL coding yet. Where in the system do these commands go?
 
Alternatively, make all of your controls on the report start and stop next to each other, effectively creating a grid of controls. Leave no space at the top or bottom either since they will use that setting between records. Then highlight the whole mess with a click-drag rectangle and change Properties>Format>Border Style, Border Color, Border Width as necessary.
No coding required.
 
Open the report in design view, click the detail selector open the property sheet, select event procedure for the on print option add this between the two lines of code that are already there, select compile and save from the debug menu. Post back if you have any problems.
 
I am receiveing a compile error - EXPECTED END SUB

The first line of code is highlighted when this error comes up
 
I don't know if I have done more bad than good.....but I deleted the 2 lines of code that were already in there...and the rest is now working OK??
 
Because Rich's code included those start-and-end lines, deleting the two that were there (duplicates) was the right thing to do. Congratulations.
 
I wish I could say I understood what the statements did, but I figured there seemed to be 1 too many Start and End-Sub comments....was that correct and what do they do?
 
When you click on the Code Builder, it automatically inputs the default opening and closing statements for the event you are coding on. Rich, being an Access God [tm], probably types the entire thing from scratch and so didn't need the computer to do it for him.
biggrin.gif

You analyzed the situation correctly.
 
Great....another step towards ACCESS GODism....ha maybe in another life perhaps

Thanks David
 

Users who are viewing this thread

Back
Top Bottom