1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access 2003- Report/Query (guessing VBA) Help

Discussion in 'Business Applications' started by alter_ego1981, Sep 26, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. alter_ego1981

    alter_ego1981 Thread Starter

    Joined:
    Jun 26, 2008
    Messages:
    49
    Hi All,

    I have a DB which has two reports which can be run depending on whether it is a single site or multisite.

    I have added a yes/no tick box to show if a multisite, but what i need to do now, is to get access to run the correct report.

    If Multisite not ticked to run Report A
    If Multisite ticked to run Report B

    I dont know enough about VBA to do this so any and all help would be helpful.

    :)
     
  2. computerman29642

    computerman29642

    Joined:
    Dec 4, 2007
    Messages:
    2,895
    Could you attach a sample databse?
     
  3. alter_ego1981

    alter_ego1981 Thread Starter

    Joined:
    Jun 26, 2008
    Messages:
    49
    Hi,

    Attched is the db, with all data removed, except 2 fake sites.

    example

    as the client has 2 sites we want to click the notice letter button which would then open up report Electricity_MultiSite_Notice_To_Client_Letter.

    However there is a twist as always with my boss, he basically wants the report to run for that client only, so say im on client 1 out of 100, he would want it to run the report on that client only, this should be acheived from the 381 Company Ref field.

    Hope you understand cos im finding it difficult lol
     

    Attached Files:

  4. computerman29642

    computerman29642

    Joined:
    Dec 4, 2007
    Messages:
    2,895
    What form?
     
  5. alter_ego1981

    alter_ego1981 Thread Starter

    Joined:
    Jun 26, 2008
    Messages:
    49
    Sorry, my mistake for not saying its the frmClientSub, which is part of frmClient.

    Thanks
     
  6. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Like this?
     

    Attached Files:

  7. alter_ego1981

    alter_ego1981 Thread Starter

    Joined:
    Jun 26, 2008
    Messages:
    49
    Bingo thats part one Tony, thanks very much :)


    The 2nd part is more tricky, or so i think, he wants the report to run for that client only so it would mean some sort of VBA to change the 381 Company Ref query to include the client ref and it would then need to know if it was single or multi site queries

    qryE_SingleSite_Notice_Letter for single site or qryE_MultiSite_Notice_Letter for the multi sites
     
  8. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Check out the qryE_MultiSite_Notice_Letter Criteria row.
     

    Attached Files:

  9. alter_ego1981

    alter_ego1981 Thread Starter

    Joined:
    Jun 26, 2008
    Messages:
    49
    cheers tony
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/753498

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice