Results 1 to 3 of 3
  1. #1
    siman's Avatar
    siman is offline Novice
    Windows 8 Access 2007
    Join Date
    Jun 2013
    Posts
    2

    how to create query based 2 combobox?

    hi guys, i have some problem with my access.


    how to create query based 2 combo box
    in my case, i have some rule : if the material is vegetable and the process is slice then the tool is knife.
    and i have 1 table to connect each primary key, the name is connection.

    i already try with this.
    SELECT tool.tool_type, material.material, process.process
    FROM tool INNER JOIN (material INNER JOIN connection ON material.ID = connection.id_material) ON tool.ID = connection.id_tool
    WHERE (((material.material)=[Forms]![Form1]![Combomaterial].[Text]));

    its work but the result like that
    material process tool_type
    vegetable slice knife
    vegetable mix mixer


    so my problem is i wanna select with 2 variable material and process, the result should be knife not with mixer.

    i try with this
    SELECT tool.tool_type, material.material, process.process
    FROM tool INNER JOIN (proses INNER JOIN (material INNER JOIN connection ON material.ID = connection.id_material) ON proses.ID = connection.proses) ON tool.ID = connection.id_tool
    WHERE (((material.material)=[Forms]![Form1]![Combomaterial].[Text] AND (process.process)=[Forms]![Form2]![Comboprocess].[Text] ));

    but it doesn't work.
    may somebody help me please...
    thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    It doesn't work
    is not helpful to the reader.

    Do any of these apply?
    It doesn't work and I get
    a) a syntax error message
    b) a message with number...
    c) the application just stops..... give some context to the reader.

    SELECT tool.tool_type, material.material, process.process
    FROM tool INNER JOIN (proses INNER JOIN (material INNER JOIN connection ON material.ID = connection.id_material) ON proses.ID = connection.proses) ON tool.ID = connection.id_tool
    WHERE (((material.material)=[Forms]![Form1]![Combomaterial].[Text] AND (process.process)=[Forms]![Form2]![Comboprocess].[Text] ));

    Are these your names or spelling mistakes?
    Good luck.

  3. #3
    siman's Avatar
    siman is offline Novice
    Windows 8 Access 2007
    Join Date
    Jun 2013
    Posts
    2
    sorry my spelling mistakes. its should be process.

    please help me, what i should be to get tool type is knife in case?

    i am newbie

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

Similar Threads

  1. Replies: 18
    Last Post: 10-10-2012, 10:10 AM
  2. Query based on Combobox Value
    By Stretch2312 in forum Programming
    Replies: 3
    Last Post: 10-08-2012, 08:23 AM
  3. Combobox Based on a Query
    By injanib in forum Forms
    Replies: 4
    Last Post: 02-09-2011, 03:13 PM
  4. Query based on combobox
    By scotty562 in forum Queries
    Replies: 6
    Last Post: 11-11-2010, 08:49 AM
  5. Query based on Value in a Combobox
    By martinwd in forum Queries
    Replies: 3
    Last Post: 06-02-2009, 02:21 PM

Tags for this Thread

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