generating omr marks using vba

amin

New member
Local time
Tomorrow, 02:50
Joined
Aug 18, 2004
Messages
7
Hey guys,

I am not tht techie person , but i hope someone would be able to help me.

Here's my dilemma. How can I create optical marks in Access Reports? I'm
generating a mail merge document within Access Reports that produces different amounts of multiple pages. For example, an individual's final output
may be 5 pgs, while another may contain 9pgs and so forth. I'd like to know how Access can distinguish between these multiple pages and generate marks (i.e. lines) that will inform an optical line scanner the number of pages to collate before starting another set.
I would be using a Folding/Inserting device that can scan lines on
a page telling it when to stop the group, insert the group into an
envelope, before starting a new group.

Is there some way around in VBA..

Thanks heaps,
 
I've been away from this for a while and I've forgotten what the marks look like. Do you need a special font to print them? Where are they on the page?
Are you at Pitney Bowes in Shelton?
 
omr

I am multiple groups in a report. I have the OMR marks saved as an image ( bmp, jpg, gif) eg. first.jpg, middle.jpg and last.jpg

Is it possible in vba to set up counters so that i can assign tht first.jpg should be goin on first page of every group , middle.jpg on every middle pages of group and last.jpg on last .jpg.

Following is the code i am using to assign page nos for groups.

thanks

Dim DB As Database
Dim GrpPages As Recordset
Public ProNum As String
Public pagenum, PageSet As Long


Function GetGrpPages()

' Find the group name.

GrpPages.Seek "=", Me![Provider Number]

If Not GrpPages.NoMatch Then

GetGrpPages = GrpPages![Page Number]

End If

End Function







Private Sub GroupHeader2_Print(Cancel As Integer, PrintCount As Integer)
passes = passes + 1
'MsgBox ("Passes = " & passes)
If passes > 0 Then
Me.GroupHeader1.ForceNewPage = 1
Else
Me.GroupHeader1.ForceNewPage = 0
End If
End Sub


Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)

' Find the group.

GrpPages.Seek "=", Me![Provider Number]

If Not GrpPages.NoMatch Then

' The group is already there.

If GrpPages![Page Number] < Me.Page Then

GrpPages.Edit

GrpPages![Page Number] = Me.Page

GrpPages.Update

End If

Else

' First page of group, so add it.

GrpPages.AddNew

GrpPages![Provider Number] = Me![Provider Number]

GrpPages![Page Number] = Me.Page

GrpPages.Update

End If
End Sub

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim Pos1, StartPage, EndPage As Long


If [Provider Number] <> ProNum Then
ProNum = [Provider Number]
Pos1 = InStr(1, Pagenumber, "of", vbBinaryCompare)

StartPage = Trim(Mid(Pagenumber, 6, Len(Pagenumber) - Pos1))
StartPage = Trim(Mid(StartPage, 1, 3))
If Pos1 + 3 <= Len(Pagenumber) Then
EndPage = Trim(Mid(Pagenumber, Pos1 + 3, Len(Pagenumber)))
End If
PageSet = (EndPage - StartPage) + 1
pagenum = 1
Else:
pagenum = pagenum + 1
End If

SF = "Page " & pagenum & " of " & PageSet

End Sub

Private Sub Report_Open(Cancel As Integer)

Set DB = DBEngine.Workspaces(0).Databases(0)

DoCmd.SetWarnings False

DoCmd.RunSQL "Delete * From [Category Group Pages];"

DoCmd.SetWarnings True

Set GrpPages = DB.OpenRecordset("Category Group Pages", DB_OPEN_TABLE)

GrpPages.Index = "PrimaryKey"

End Sub
 

Users who are viewing this thread

Back
Top Bottom