N
Newf via AccessMonster.com
Hi!
I've been trying to print only 1 record - current record - but when printing
all records are printed. This is the code I have:
Dim strWhere As String
If Me.Dirty Then 'Save any changes.
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "SELECT A RECORD TO PRINT"
Else
strWhere = "[tblPersonal.Id_Personal] = " & Me.[tblPersonal.Id_Personal]
DoCmd.OpenReport "rptTEST", acViewPreview, strWhere
End If
I also have found this code but it seems not to work. Even when I take that
code out and place this one in it doesn't work:
Dim strDocName As String
Dim strWhere As String
strDocName = "rptTEST"
strWhere = "[Id_Personal]=" & Me!Id_Personal
DoCmd.OpenReport strDocName, acPreview, , strWhere
Can some kind person be able to help me out???
Thanks in advance!
Newf
~Everyone needs a Newfie as a friend~
I've been trying to print only 1 record - current record - but when printing
all records are printed. This is the code I have:
Dim strWhere As String
If Me.Dirty Then 'Save any changes.
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "SELECT A RECORD TO PRINT"
Else
strWhere = "[tblPersonal.Id_Personal] = " & Me.[tblPersonal.Id_Personal]
DoCmd.OpenReport "rptTEST", acViewPreview, strWhere
End If
I also have found this code but it seems not to work. Even when I take that
code out and place this one in it doesn't work:
Dim strDocName As String
Dim strWhere As String
strDocName = "rptTEST"
strWhere = "[Id_Personal]=" & Me!Id_Personal
DoCmd.OpenReport strDocName, acPreview, , strWhere
Can some kind person be able to help me out???
Thanks in advance!
Newf
~Everyone needs a Newfie as a friend~