Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2004
    Posts
    10

    Unhappy Unanswered: reports in access

    I'm working in an application with access and visual basic and I want to print some reports. I haven't crystal reports so I try to do the reports in access and after open them in VB. How I can do that?
    Also I'm trying to design a report with an input argument but I don't know how to put it in the macro...
    I HAVE A LOT OF DOUBTS!!!!!!!! CAN SOMEONE HELP ME??????
    THANKSSSSSS

  2. #2
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    Reports

    Sorry I have no idea how to open a report from Access in VB. When I have had to produce reports in VB in the past I've simply taken forms and chenges all the design settings to make them look like reports.

    I'm not sure what you mean by an input argument for a report. You can pass a variable to a report using the OpenArgs. If you open a report from a form you can, e.g. use:

    DoCmd.OpenReport "rptLabels", acViewPreview, , , acWindowNormal, "Fred"

    or something similar where "Fred" is the value you pass tot he report.

    Personally I like to base reports on queries and pass global variables to the query to filter the data, then all the report has to do is show it.

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Ryker
    You can pass a variable to a report using the OpenArgs ...
    Only in Access 2002 and up. In Access 2000 and prior there is no OpenArgs property for the OpenReport command ...
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    OpenOrgs

    Thanks Mike - I was forgetting. (didn't realise that I'd been using XP for so long!)

    The other alternative is to use global variables or the filter property for a report. Of the two I prefer to set up global variables using a module.

  5. #5
    Join Date
    Sep 2004
    Posts
    10
    Thank you. I have investigated and now I know in access 2000 the last argument of openReport is wherecondition, there I can put the data I needed.

Posting Permissions

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