Results 1 to 3 of 3
  1. #1
    Richie27 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Ireland
    Posts
    159

    Query problem, help (db attached)

    Hi all,



    I was banging my head off the wall with this for an entire day with no joy!

    I want to run a query based on input into a box on frm_MainMenu (The query runs by hitting the button underneath) It is currently Query 1 in the navigation bar - this has all the info I need)

    The boxes are input on the form frmFN_MainMenu

    I have put in 3 boxes under categories of

    1. Business West (Cost centre tbl)| Purchases (Cat Description tbl) | PIN (Cost Description tbl) (these are stored according to file number)
    2. Business West| Purchases | PCRN (these are stored according to date)
    3. Subsidiaries | Accounts (these are stored according to date)

    I'm thinking I need at least 2 queries (in VBA) behind the button on frm_MainMenu on account of the cost centres differences. Business West have three criteria I need (like 1 above) and all others have only 2 (like 3 above).

    What I was thinking is to have a query run based on the box number. In other words if the box number relates to Business West, the first query runs else the second query runs.

    Any help would be much appreciated.

    See attached DB.


    Thanks,
    Rich.

    test.zip

  2. #2
    Richie27 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Ireland
    Posts
    159
    Okay - I have my queries going fine and have created a third one which takes the value from the text box.

    If that query comes back null it runs one query and if not it runs the other.

    Nearly there.

    Just need to find the right bit of VBA now! ;-)

  3. #3
    Richie27 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Ireland
    Posts
    159
    Moving this to programming thread now. SQL is sorted. Byeeee!

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

Similar Threads

  1. Help me - attached file
    By uronmapu in forum Access
    Replies: 9
    Last Post: 06-06-2012, 08:34 AM
  2. Replies: 5
    Last Post: 12-14-2011, 08:24 AM
  3. Replies: 2
    Last Post: 09-18-2011, 03:45 AM
  4. Attached Files
    By tcheck in forum Access
    Replies: 1
    Last Post: 08-11-2011, 09:46 PM
  5. Where are attached files stored?
    By Delta223 in forum Access
    Replies: 3
    Last Post: 01-11-2011, 10:32 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