Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Print one record (WXP Access 2000)

    How do I set up a command button on a form that calls a report, but will only print the current record?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print one record (WXP Access 2000)

    You need to have a field that specifies the current record, say an AutoNumber field RecordID.

    Private Sub cmdReport_Click()
    DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, _
    WhereCondition:="[RecordID]=" & Me.[RecordID]
    End Sub

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Print one record (WXP Access 2000)

    Thanks Hans,

    That works like a charm.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •