I am very new to vb and trying to make a front for a database. I can print the access report using the code below but it prints all records and i just want to print the current record.
Private Sub Command2_Click()
Dim oApp As Object
Set oApp = GetObject("C:\windows\desktop\security\security.mdb", "access.application")
oApp.Visible = False
oApp.DoCmd.openReport "security"
End Sub
