Dynamically draw table in report

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

Guest

Does anyone know how I could have a table drawn in a report based on some of
the other fields in the report, I have a report that outputs informaton about
an order that was placed so I have fields for QtyMade and #SitesToMeasure.
When the parts go to the QA tech I want a printout that includes a table
where he/she can write the data. So if Qty is 25 and #Sites is 2, my report
will have a table with 25 rows for PartID and 2 Columns for Data. Any help is
appreciated.
 
This code will draw a table in a report:
Private Sub Report_Page()
Me.Line (1000, 1000)-Step(8000, 200), , B
Me.Line (1400, 1200)-Step(7200, 500), , B
Me.Line (1800, 1700)-Step(400, 3000), , B
Me.Line (7800, 1700)-Step(400, 3000), , B
End Sub

However, If you want something dependent on your data, you might start by
creating a table of numbers with a single numeric field (tblNums.Num). Add
numbers 1 through your max qty. Add this table to your report's record
source and set the criteria under the Num field/column to <=[QtyMade].

This should create your 25 rows. You can write some code using the Line
method in the detail section to draw rectangles based on the number of
sites.
 
Very cute, but you forgot the bowl of fruit !!
I bow before you, Lord of Access.

Duane Hookom said:
This code will draw a table in a report:
Private Sub Report_Page()
Me.Line (1000, 1000)-Step(8000, 200), , B
Me.Line (1400, 1200)-Step(7200, 500), , B
Me.Line (1800, 1700)-Step(400, 3000), , B
Me.Line (7800, 1700)-Step(400, 3000), , B
End Sub

However, If you want something dependent on your data, you might start by
creating a table of numbers with a single numeric field (tblNums.Num). Add
numbers 1 through your max qty. Add this table to your report's record
source and set the criteria under the Num field/column to <=[QtyMade].

This should create your 25 rows. You can write some code using the Line
method in the detail section to draw rectangles based on the number of
sites.

--
Duane Hookom
MS Access MVP
--

J said:
Does anyone know how I could have a table drawn in a report based on some
of
the other fields in the report, I have a report that outputs informaton
about
an order that was placed so I have fields for QtyMade and #SitesToMeasure.
When the parts go to the QA tech I want a printout that includes a table
where he/she can write the data. So if Qty is 25 and #Sites is 2, my
report
will have a table with 25 rows for PartID and 2 Columns for Data. Any help
is
appreciated.
 
I created a United States flag once (I think this was shortly after 9/11).

Did my serious reply help you at all?

--
Duane Hookom
MS Access MVP


J said:
Very cute, but you forgot the bowl of fruit !!
I bow before you, Lord of Access.

Duane Hookom said:
This code will draw a table in a report:
Private Sub Report_Page()
Me.Line (1000, 1000)-Step(8000, 200), , B
Me.Line (1400, 1200)-Step(7200, 500), , B
Me.Line (1800, 1700)-Step(400, 3000), , B
Me.Line (7800, 1700)-Step(400, 3000), , B
End Sub

However, If you want something dependent on your data, you might start by
creating a table of numbers with a single numeric field (tblNums.Num).
Add
numbers 1 through your max qty. Add this table to your report's record
source and set the criteria under the Num field/column to <=[QtyMade].

This should create your 25 rows. You can write some code using the Line
method in the detail section to draw rectangles based on the number of
sites.

--
Duane Hookom
MS Access MVP
--

J said:
Does anyone know how I could have a table drawn in a report based on
some
of
the other fields in the report, I have a report that outputs informaton
about
an order that was placed so I have fields for QtyMade and
#SitesToMeasure.
When the parts go to the QA tech I want a printout that includes a
table
where he/she can write the data. So if Qty is 25 and #Sites is 2, my
report
will have a table with 25 rows for PartID and 2 Columns for Data. Any
help
is
appreciated.
 
I have so many other pressing issues to fix in my database that this
particular request has fallen to the bottom of the list. Thanks, I will try
it soon.

Duane Hookom said:
I created a United States flag once (I think this was shortly after 9/11).

Did my serious reply help you at all?

--
Duane Hookom
MS Access MVP


J said:
Very cute, but you forgot the bowl of fruit !!
I bow before you, Lord of Access.

Duane Hookom said:
This code will draw a table in a report:
Private Sub Report_Page()
Me.Line (1000, 1000)-Step(8000, 200), , B
Me.Line (1400, 1200)-Step(7200, 500), , B
Me.Line (1800, 1700)-Step(400, 3000), , B
Me.Line (7800, 1700)-Step(400, 3000), , B
End Sub

However, If you want something dependent on your data, you might start by
creating a table of numbers with a single numeric field (tblNums.Num).
Add
numbers 1 through your max qty. Add this table to your report's record
source and set the criteria under the Num field/column to <=[QtyMade].

This should create your 25 rows. You can write some code using the Line
method in the detail section to draw rectangles based on the number of
sites.

--
Duane Hookom
MS Access MVP
--

Does anyone know how I could have a table drawn in a report based on
some
of
the other fields in the report, I have a report that outputs informaton
about
an order that was placed so I have fields for QtyMade and
#SitesToMeasure.
When the parts go to the QA tech I want a printout that includes a
table
where he/she can write the data. So if Qty is 25 and #Sites is 2, my
report
will have a table with 25 rows for PartID and 2 Columns for Data. Any
help
is
appreciated.
 
Back
Top