Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    19

    Unanswered: Print current record on a report from a form

    When I place the command

    DoCmd.OpenReport "Report Name" , acViewNormal, , "[PrimaryID] = " & Me.PrimaryID

    It gives me an error

    Microsoft Access can not find the macro "DoCmd"

  2. #2
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    133

    Re: Print current record on a report from a form

    Where are you placing it?

  3. #3
    Join Date
    Mar 2004
    Posts
    19
    Sry

    I am placing a command button on the form with the string place in the on click.

    Not sure do I need to create a macro for that report?

  4. #4
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    133
    It sounds like you typed it right in the properties window. In the On Click field, click the little arrow on the right and choose [Event Procedure]. Then click the button with the three dots to the right of that. That will open the VBA window. Paste your text in the Click sub procedure that comes up. Hopefully that should work.

Posting Permissions

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