Reports

  • Thread starter Thread starter Josh
  • Start date Start date
J

Josh

Im new to access and creating databases in general. I was woundering
how to take information from my form and put it in to a report.

I have a workorder form that pules from 3 tables. workorders,
workorderparts, and workorderlabor.
I want the users to be able to click a view workorder button and a
printable report pops up with just the workorder they where looking at.
Right now all I can get is a report w/ all the workorders listed or just
field lables and no information.
 
Create reports in much the same way you create forms. I expect your parts
and labor would each be subreports on a main report. If you have a form open
with a specific WorkOrderNum value, you could use code behind a button like:
Dim strWhere as String
strWhere = "WorkOrderNum=" & Me.txtWordOrderNum
DoCmd.OpenReport "rptWorkOrder", acPreview, , strWhere
This assumes the workorder number is numeric. If it is text then substitute
in this line:
strWhere = "WorkOrderNum=""" & Me.txtWordOrderNum & """"
 
Back
Top