Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Location
    Perth
    Posts
    6

    Cool Showing OpenArgs in a Report.

    How do I show a OpenArg in a Report.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What have you tried so far?

  3. #3
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    On your form you can use some code like this:
    Private Sub cmdPreview_Click()
    Dim strArg As String

    strArg = Me.payorname

    DoCmd.OpenReport "rptEmployers", acViewPreview, , , , strArg
    End Sub

    Then on the report, create a label to hold your Arg string and add code like this to the open event:
    Private Sub Report_Open(Cancel As Integer)
    Dim strArgs As String
    strArgs = Me.OpenArgs

    Me.lblArgs.Caption = strArgs
    End Sub

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

Similar Threads

  1. Report Showing ID number and not the name
    By tipopilotas in forum Reports
    Replies: 11
    Last Post: 07-20-2015, 03:21 PM
  2. Replies: 9
    Last Post: 10-21-2011, 08:38 AM
  3. Opening a form with openargs and things
    By mwabbe in forum Forms
    Replies: 5
    Last Post: 09-29-2010, 11:01 AM
  4. Report showing duplicate record
    By cwwaicw311 in forum Reports
    Replies: 13
    Last Post: 04-07-2010, 04:00 AM
  5. Showing Search In Report
    By Computer202 in forum Reports
    Replies: 1
    Last Post: 03-06-2010, 05:48 AM

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