Report Question

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

Guest

I have a a database that I input data from on a monthly basis, by the day
that the item was logged.
The log sheet is currently an Excel spreadsheet but would like to run it in
Access. What I need to be able to do is select the month the log is for
(which is the easy part). There will also be a textbox in the details
section that I want to have incrementally progress until the last day of the
month. It would look similar to this:

Report Title

1/1/06 ________________
1/2/06 ________________
1/3/06 ________________
1/4/06 ________________
1/5/06 ________________
etc

Is there a way to have a report run such as this? I figure that there
should be but am at a loss.
 
As per my response to your same question in Tek-Tips.com
Create a blank report with NO record source. Add code to the On Page event
of the report like:

Private Sub Report_Page()
Dim datStart As Date
Dim intTextLeft As Integer
Dim intLineLeft As Integer
Dim intLineLen As Integer
Dim intVSpace As Integer
intTextLeft = 200
intLineLeft = 1200
intLineLen = 2000
intVSpace = 400
datStart = CDate(InputBox("Enter Start Date", _
"Enter Start", Format(Date, "mm/dd/yyyy")))
datStart = DateSerial(Year(datStart), _
Month(datStart), 1)
intMonth = Month(datStart)
Do Until Month(datStart) <> intMonth
CurrentY = Day(datStart) * intVSpace
CurrentX = intTextLeft
Me.Print Format(datStart, "mm/dd/yyyy")
Me.Line (intLineLeft, CurrentY)-Step(intLineLen, 0)
datStart = datStart + 1
Loop
End Sub
 
Back
Top