Results 1 to 4 of 4
  1. #1
    chrisjack001 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    12

    If Statement or better option

    I have a subform called (Recocilation Account Budget >=5) that opens up in dataview sheet. I want the user to be able to open other records in other forms specifically when he/she DOUBLE CLICKS that row in subform (Recocilation Account Budget >=5) based on the following conditions in the column field [Budgetcategory] of the subform (Recocilation Account Budget >=5)
    Some fields in the form are
    Account BudgetCategory Voucher
    These are the conditions:


    If the BudgetCategory = 5, 7, 8 or 9 Open that specific record by Account in a form called Req Log
    If the BudgetCategory = 6 Open that specific record by Account in a form called Travel

    Thank you very much in Advance

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Here's the technique to open another form on a specific record:

    BaldyWeb wherecondition

    Your login would be

    Code:
    If Me.BudgetCategory = 6 Then
      'open one form
    Else
      'Open the other
    End If
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    chrisjack001 is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    12

    If Statement

    I used this code in the expression builder ON Double Click but it did not work. Can you tell me where Im suppose to put this code and this is what I type. I Im new at this.

    If Me.BudgetCategory = 6 Then
    Open frm.Travel
    Else
    Open frm.Req Log
    End If

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Check the link I posted for the correct syntax to open a form (you can drop the wherecondition part if you don't want it).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Drop down option?
    By kwy in forum Database Design
    Replies: 1
    Last Post: 06-02-2010, 12:13 PM
  2. Option Group - Borders are gone
    By cevatyildiz in forum Forms
    Replies: 0
    Last Post: 04-30-2010, 06:08 AM
  3. Option Group
    By huskies in forum Forms
    Replies: 9
    Last Post: 12-02-2009, 12:06 PM
  4. no option to import xls file or option all files
    By captgnvr in forum Import/Export Data
    Replies: 3
    Last Post: 09-22-2009, 10:19 AM
  5. Browse Option
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 01-10-2006, 09:46 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