Results 1 to 4 of 4
  1. #1
    willy292 is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    4

    Unable to retreive the right value from form

    I have very green in access, which I would like to search the project by team and more than team can take over on the same project. If tick the box for teamA and teamB, only project do by both team
    can be display, but my Access query as below cannot work, please help

    I have a table, form and a query

    Table structure

    Project Name , Description , teamA(Yes/No Box), teamB (Yes/No Box), teamC (Yes/No Box)

    Form namely search project by team
    show three Yes /No box for selection

    query

    SELECT Projects.[Project Name],
    Projects.[Project Description], Projects.[Project Category], Projects.[Start


    Date], Projects.[Est Completion Date], Projects.[End Date], Projects.[Project
    Benefits/ Impact], Projects.[IT Resource], Projects.[Key Participant], Projects.[Last Update/Comments],
    Projects.[Action Owners], Projects.Status, Projects.Activity,

    FROM Projects

    WHERE (((Projects.[TeamA])=[Forms]![Search Project by Team]![TeamA]) AND ((Projects.[TeamB])=[Forms]![Search Project by Team]![TeamB]) AND ((Projects.[TeamC ])=[Forms]![Search Project by Team]![TeamC]))

  2. #2
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    In general, it looks fine. The two things that look wrong to me are this -

    1) There should not be a comma after the last field being selected.

    2) There should not be a space between the first "[TeamC" and "]" in this part ->
    Code:
    ((Projects.[TeamC ])=[Forms]![Search Project by Team]![TeamC]))
    If fixing those doesn't fix it, then please describe the exact error message (or behavior) you get.

  3. #3
    willy292 is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    4
    no error message but no record found

  4. #4
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    OKay, try this
    Code:
    WHERE (
         (((Projects.[TeamA])=[Forms]![Search Project by Team]![TeamA]) OR ((Projects.[TeamA])IS NULL)) 
    AND  (((Projects.[TeamB])=[Forms]![Search Project by Team]![TeamB]) OR ((Projects.[TeamB])IS NULL)) 
    AND  (((Projects.[TeamC])=[Forms]![Search Project by Team]![TeamC]) OR ((Projects.[TeamC])IS NULL)) 
          )

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

Similar Threads

  1. Unable to embed images on a form.
    By Morogth in forum Forms
    Replies: 3
    Last Post: 11-14-2012, 11:02 PM
  2. Replies: 1
    Last Post: 06-26-2012, 10:02 PM
  3. Unable to update form
    By huongdl1987 in forum Forms
    Replies: 5
    Last Post: 05-31-2012, 03:10 PM
  4. Unable to add a record on a form
    By JamiB1979 in forum Forms
    Replies: 1
    Last Post: 06-22-2011, 08:36 PM
  5. Unable to view objects in (startup) Form
    By sdondeti in forum Forms
    Replies: 0
    Last Post: 11-10-2009, 04:04 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