filter

Discussion in 'Access Macros' started by RayNDM83, May 25, 2010.

  1. RayNDM83

    RayNDM83 Guest

    Hi,
    Is there a way to replicate this vba command using the macros?
    If Me.Filter = "" Then
    MsgBox "Apply a filter to the form first."
    Else
    DoCmd.OpenReport "r_PullPkgCkOffSheet", acViewPreview, , Me.Filter
    End If
    End Sub
    The reason why I'm asking is, when I make my dbase to ACCDE the vba code
    does not work while macros do.
    Thanks for the help.
    Ray
     
    RayNDM83, May 25, 2010
    #1
    1. Advertisements

  2. Ray,

    Yes, it is possible to do this same process in a macro.

    But possibly the best solution to your problem would be to work out why the
    VBA code is failing. First of all, make sure the .accde file is in a
    Trusted Location.
     
    Steve Schapel, May 25, 2010
    #2
    1. Advertisements

  3. RayNDM83

    RayNDM83 Guest

    Hi Steve,
    Yes, my dbase is in a trusted location.
    Thanks,
    Ray
     
    RayNDM83, May 27, 2010
    #3
  4. Ray,

    Ok. So when you say "the vba code does not work", do you mean *any* of the
    VBA code, or just this specific procedure?

    If you mean just this specific procedure, what actually happens? Error
    message? Nothing at all happens? The report opens but is not filtered?
     
    Steve Schapel, May 27, 2010
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.