OCR ScanTron Forms

C

Chip

Has anyone ever heard of Access being used to fill out scan tron
forms? One of our bread and buttter forms we use is a OCR Scan tron
form that collects demographic data. What I'd like to be able to do
is fill in the information into my database, and then have access
print out the requested information, as a report, onto a Scan Tron
form.

Why you may ask? Well needlss to say, nothing has changed from the
days when I was in high school. Bubbling in the correct dot on the
form with 500 dots, is easier said than done and I think it would be
helpful to automate the process.

Chip
 
J

James A. Fortune

Chip said:
Has anyone ever heard of Access being used to fill out scan tron
forms? One of our bread and buttter forms we use is a OCR Scan tron
form that collects demographic data. What I'd like to be able to do
is fill in the information into my database, and then have access
print out the requested information, as a report, onto a Scan Tron
form.

Why you may ask? Well needlss to say, nothing has changed from the
days when I was in high school. Bubbling in the correct dot on the
form with 500 dots, is easier said than done and I think it would be
helpful to automate the process.

Chip

In:

http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/62f56b4d96ab9a82

I use an Access program to create layouts for PDF files.

PDF files don't have a native function to generate circles so they must
be generated arduously using Bezier Curves.

Here's a function (you'll need to fix any lines that wrap) to draw
filled circles in PDF given the coordinates of the center (in points),
the radius (in points) and the level of grayness (Note: 0.0 = black, 1.0
= white):

Public Function DrawFilledCircle(ByVal dblX As Double, ByVal dblY As
Double, ByVal dblR As Double, ByVal dblGray As Double) As String
Dim P1x As Double
Dim P1y As Double
Dim P1ux As Double
Dim P1uy As Double
Dim P1dx As Double
Dim P1dy As Double
Dim P2x As Double
Dim P2y As Double
Dim P2rx As Double
Dim P2ry As Double
Dim P2lx As Double
Dim P2ly As Double
Dim P3x As Double
Dim P3y As Double
Dim P3ux As Double
Dim P3uy As Double
Dim P3dx As Double
Dim P3dy As Double
Dim P4x As Double
Dim P4y As Double
Dim P4rx As Double
Dim P4ry As Double
Dim P4lx As Double
Dim P4ly As Double
Dim strTemp As String
Dim strCR As String
Const CRatio = 0.55228475

strCR = Chr(13)
P1x = dblX + dblR
P1y = dblY
P1ux = P1x
P1uy = P1y + CRatio * dblR
P1dx = P1x
P1dy = P1y - CRatio * dblR
P2x = dblX
P2y = dblY + dblR
P2rx = P2x + CRatio * dblR
P2ry = P2y
P2lx = P2x - CRatio * dblR
P2ly = P2y
P3x = dblX - dblR
P3y = dblY
P3ux = P3x
P3uy = P3y + CRatio * dblR
P3dx = P3x
P3dy = P3y - CRatio * dblR
P4x = dblX
P4y = dblY - dblR
P4rx = P4x + CRatio * dblR
P4ry = P4y
P4lx = P4x - CRatio * dblR
P4ly = P4y
strTemp = "q" & strCR
strTemp = strTemp & "0.05 w" & strCR
strTemp = strTemp & CStr(dblGray) & " g" & strCR
'Move to the right side of the circle
strTemp = strTemp & CStr(P1x) & " " & CStr(P1y) & " m" & strCR
strTemp = strTemp & CStr(P1ux) & " " & CStr(P1uy) & " " & CStr(P2rx) & "
" & CStr(P2ry) & " " & CStr(P2x) & " " & CStr(P2y) & " c" & strCR
strTemp = strTemp & CStr(P2lx) & " " & CStr(P2ly) & " " & CStr(P3ux) & "
" & CStr(P3uy) & " " & CStr(P3x) & " " & CStr(P3y) & " c" & strCR
strTemp = strTemp & CStr(P3dx) & " " & CStr(P3dy) & " " & CStr(P4lx) & "
" & CStr(P4ly) & " " & CStr(P4x) & " " & CStr(P4y) & " c" & strCR
strTemp = strTemp & CStr(P4rx) & " " & CStr(P4ry) & " " & CStr(P1dx) & "
" & CStr(P1dy) & " " & CStr(P1x) & " " & CStr(P1y) & " c" & strCR
strTemp = strTemp & "b S" & strCR
strTemp = strTemp & "Q" & strCR
DrawFilledCircle = strTemp
End Function

Any pair of quotes above not containing text contain a space. Since you
can also use decimals when specifying points, the function should allow
you to position your ScanTron dots quite accurately based on the values
recorded in your database. The origin for PDF files is the lower left
of the page with x to the right and y upward. You can use the layout
viewer to see what the output of the function will do, then put the
function in your Access application. Post back if you would like more
information about using that technique. My particular formula, but not
implementation, for using Bezier Curves in generating circles in PDF
files was obtained from:

http://www.tinaja.com

One tip:

If the ScanTron form uses a fixed printing plate then different batches
of forms may have the margins vary slightly from batch to batch, yet the
relative positions will be the same. For a similar application for
tooling inspection reports I have an Access form that comes up and
allows the user to nudge the entire document slightly up or down and
left or right and save the values in a nudge table. The nudge table
only gets changed when a new print batch needs it to be changed.

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top