Open report problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • martin

    #1

    Open report problem

    I have this statement
    DoCmd.OpenRepor t "test", acViewPreview, , "[MemberID] = " & Me.MemberID
    to print only the current record. It will pop up a box to define MemberID
    every time it is run. What am I missing? Also how do I get the correct
    data into the report as I have 2 related tables the data is of. Currently I
    have a query feeding the report - is this correct?
    Thanx


  • pietlinden@hotmail.com

    #2
    Re: Open report problem


    martin wrote:[color=blue]
    > I have this statement
    > DoCmd.OpenRepor t "test", acViewPreview, , "[MemberID] = " &[/color]
    Me.MemberID[color=blue]
    > to print only the current record. It will pop up a box to define[/color]
    MemberID[color=blue]
    > every time it is run. What am I missing? Also how do I get the[/color]
    correct[color=blue]
    > data into the report as I have 2 related tables the data is of.[/color]
    Currently I[color=blue]
    > have a query feeding the report - is this correct?
    > Thanx[/color]

    remove all the unnecessary filters from the query. (You can remove all
    of them if you like.) Then you can pass the parameters in when you
    open the report in the Where clause, like you are doing. Just make
    sure that if MemberID is a text field, then you have to delimit the
    value you pass with quotes. If you have two related tables you need to
    either base the report on a query or use a subreport.

    Comment

    Working...