create a table on a report?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possilbe to create a table on a report?

the reason I am asking is that I have an invoice report that I would like to
have formated with column lines around my invoice details as well as a box
around the details?

If anyone knows of how this can be accomplished... please pass it on.

Thanks,

Brook
 
Brook:

You don't create a table in an Access report like you do say in Word. What
you do is to set the border of a text box to be solid and then nudge the
text boxes together to create the table look.
 
I understand how to create a border around a text box, but I only want
vertical lines and not horizontal? is this possible? Or do I just have to
draw all my individual lines and try to get them to line up?

Brook
 
It is fairly simple to draw lines in the On Page (or other events). For
instance, the following code will draw a calendar of the current month.
Vertical lines have a width of zero.

Private Sub Report_Page()
Dim lngDayHeight As Long
Dim lngDayWidth As Long
Dim datRptDate As Date
Dim intStartWeek As Integer
Dim lngTopMargin As Long
Dim dat1stMth As Date
Dim datDay As Date
Dim lngTop As Long
Dim lngLeft As Long
datRptDate = Date
dat1stMth = DateSerial(Year(datRptDate), Month(datRptDate), 1)
intStartWeek = DatePart("ww", dat1stMth)
lngDayHeight = 2160 'one & half inch
lngDayWidth = 1440 'one inch
lngTopMargin = 720 'half inch
Me.FontSize = 22
'loop through all days in month
For datDay = dat1stMth To DateAdd("m", 1, dat1stMth) - 1
'find the top and left corner
lngTop = (DatePart("ww", datDay) - intStartWeek) * _
lngDayHeight + lngTopMargin
lngLeft = (Weekday(datDay) - 1) * lngDayWidth
If Weekday(datDay) = 1 Or Weekday(datDay) = 7 Then
Me.DrawWidth = 8
Else
Me.DrawWidth = 1
End If
'draw a rectangle for day
Me.Line (lngLeft, lngTop)-Step _
(lngDayWidth, lngDayHeight), , B
Me.CurrentX = lngLeft + 50
Me.CurrentY = lngTop + 50
Me.Print Day(datDay)
Next
End Sub
 
Back
Top