Tuesday, June 20, 2017

Print Current Record And Make Magic Print Employee Id card true Ms access without programing using m

Print Current Record And Make Magic Print Employee Id card true Ms access without programing using m

Sample View Form


Sample Print current id

sample print all
sample codding simple code jus add the print name of the current id

Event Viewer code

Option Compare Database

Private Sub Print_Click()

 Dim strReportName As String
    Dim strCriteria As String

    If NewRecord Then
        MsgBox "This record contains no data. Please select a record to print or Save this record." _
             , vbInformation, "Invalid Action"
        Exit Sub
    Else
        strReportName = "CardEmployee"
        strCriteria = "[ID]= " & Me![ID]
    
       
       DoCmd.OpenReport strReportName, acViewPreview, , strCriteria

    End If

End Sub




No comments:

Post a Comment