Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Posts
    1

    how to create a macro or code to...

    how to create a macro or code to select a different report?



    I have a form with a cmd button click for preview and I put two options buttons. If the first is checked put value 1 in field table, if the second put value 2.

    I have two reports and I need to select one of them if the option button is checked.

    I try to do a macro and I try code but negative.

    Best regards,

    eaglezinha

  2. #2
    jya is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2007
    Location
    Chicagoland
    Posts
    109
    If it is only two options, how about this?

    If Frame.value = 1 then
    docmd.openreport "Report1", acViewPreview
    Elseif Frame.value =2 then
    docmd.openreport "Report2", acViewPreview
    End If

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-06-2011, 04:18 PM
  2. Replies: 0
    Last Post: 08-25-2008, 12:17 PM
  3. Macro for Indexed Value
    By jversiz in forum Access
    Replies: 0
    Last Post: 10-19-2007, 01:16 PM
  4. Replies: 0
    Last Post: 01-01-2007, 02:26 PM
  5. macro to updated tables
    By Wrangler in forum Import/Export Data
    Replies: 1
    Last Post: 01-18-2006, 11:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums