[COLOR=DarkOliveGreen]'This event occurs immediately after a card has been scanned but before any processing has taken place.[/COLOR]
Public Sub MembershipScanning_CardScanned(oMemScanDisplay As Object, ByVal sScannedData As String, ByRef lMembershipID As Long, ByRef lMembershipTableID As Long, ByRef lMembershipCardID As Long, ByRef bCancelDefault As Boolean)
'oMemScanDisplay : Reference to the membership scanning display dataobject
'sScannedData : Indicates the data that was scanned
'lMembershipID : Allows you to return the MembershipID to be displayed
'lMembershipTableID : Allows you to return the MembershipTableID to be displayed
'lMembershipCardID : Allows you to return the MembershipCardID to be displayed
'bCancelDefault : Indicates that the system should skip the default processing of the scanned data and operate instead on the IDs returned from this event
Dim oScanDisplay As IBBMemScanDisplay
On Error GoTo ErrHandler
Set oScanDisplay = oMemScanDisplay
If Not oScanDisplay Is Nothing Then
'< place your custom CardScanned code here >
End If
Set oScanDisplay = Nothing
On Error GoTo 0
Exit Sub
ErrHandler:
Dim sErr As String
sErr = Err.Description
On Error GoTo 0
'< place your custom error handling code here >
MsgBox "Error processing MembershipScanning_BeforeDisplay : " & sErr
Set oScanDisplay = Nothing
Exit Sub
End Sub
'This event occurs after the card has been scanned and the information is displayed
Public Sub MembershipScanning_AfterDisplay(oMemScanDisplay As Object)
'oMemScanDisplay : Reference to the membership scanning display dataobject
Dim oScanDisplay As IBBMemScanDisplay
On Error GoTo ErrHandler
Set oScanDisplay = oMemScanDisplay
Begin:
Printer.Orientation = vbPRORLandscape
Printer.Font = "Courier new" ' "r_ansi" '"TIMES NEW ROMAN"
Printer.FONTBOLD = True
Printer.FONTSIZE = 10
Application.VBE.VBProjects(1).Description = "Hot Sauce"
Debug.Print Application.VBE.VBProjects(1).Description
Printer
Printer.Print "This is a test"
Printer.EndDoc
If Not oScanDisplay Is Nothing Then
End If
Set oScanDisplay = Nothing
On Error GoTo 0
Exit Sub
ErrHandler:
Dim sErr As String
sErr = Err.Description
On Error GoTo 0
'< place your custom error handling code here >
MsgBox "Error processing MembershipScanning_AfterDisplay : " & sErr
Set oScanDisplay = Nothing
Exit Sub
End Sub