Results 1 to 4 of 4
  1. #1
    AndreasPanayiotou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    21

    On Double Click Open Form with two criteria

    Hello all ,


    I have used and i am still using this function as its really helpful but today i need something more than that as i need multiple criterias on this VBA Code.
    When i click on the Name of the Employee, i want to be transfer in the related field.
    This is easy but now i need two criteria, such as the name of the employee as also the Season ID .
    SeasonID basicly defines the Year such as 2012 ,2013.
    So for this situation i want to transfer me in the form that a user has the correspont information about 2013 year only and not 2012.
    If i i dont define the SeasonID all it will bring me all the results of 2012 and 2013
    Here is how is my recently code:
    DoCmd.OpenForm "EmployeeTable", , , "[EmployeeName] = '" & Me.EmployeeName & "'"
    DoCmd.Close acReport, "AnnualLeaveDetails"
    So now i need to modify it to be something like that [SeasonID] = me.SeasonID as also if i can define to bring me in Seasonid that equals to 2013=2
    This of course should be a combination with the employeename.

  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
    Presuming season is numeric:

    DoCmd.OpenForm "EmployeeTable", , , "[EmployeeName] = '" & Me.EmployeeName & "' AND [SeasonID] = " & me.SeasonID
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    AndreasPanayiotou is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    21
    Hello,
    Sorry for the late response , yes its working thanks a lot pbaldy

  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
    Happy to help.
    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. double click to open
    By spleewars in forum Programming
    Replies: 7
    Last Post: 05-22-2012, 11:52 AM
  2. Replies: 1
    Last Post: 03-15-2012, 05:41 PM
  3. Replies: 10
    Last Post: 02-20-2012, 11:25 AM
  4. Tables/Queries/Etc Won't Open on Double Click
    By William McKinley in forum Access
    Replies: 3
    Last Post: 07-27-2011, 07:45 AM
  5. Opening another form by double click
    By chrisjack001 in forum Access
    Replies: 1
    Last Post: 10-13-2010, 02:19 PM

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