Results 1 to 6 of 6
  1. #1
    jellybeannn is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    5

    select statement

    This query is used to populate a ComboBox.

    SELECT Model.mod_id, ( SELECT (Manufacture.manufacture) FROM Manufacture WHERE Manufacture.man_id = Model.man_id ) + ' - ' + Model.model + ' - ' + Model.imei_no FROM Model WHERE Model.mod_id<>Customers.mod_id;

    I've got two problems with this query:
    1. Model.imei_no, if this is included nothing is displayed, without it manufacture and model show.


    2. FROM Model WHERE Model.mod_id<>Customers.mod_id; with this nothing is displayed even id's which is not in the customer table, they are a relationship

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    Are you making the query using query design?

  3. #3
    jellybeannn is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    5
    No, I'm making the query in the ComboBox Row Source.

  4. #4
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    As you self describe as a novice, I would recommend that you develop & test the query using query design. Save it with a name. Then make your combobox and source it on that query.

  5. #5
    jellybeannn is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    5
    Ok I'm very new to this so please bear with me,

    The dropdown has to show the make, model and imei no.
    e.g Nokia - S125 - 1234468

    I tried creating it in the design view but when I call the query from the drop down only the model is shown.

  6. #6
    jellybeannn is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    5
    Ok I'm a step ahead.

    The problem is that it is looking for a mod_id and a customer id. But I want it to show all the mod_id's where it is NOT in all of the customer id's how would I do this.

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

Similar Threads

  1. Use of COLLATE statement in SELECT clause
    By zurek in forum Queries
    Replies: 7
    Last Post: 03-16-2011, 06:46 AM
  2. Logic statement to select report
    By AKQTS in forum Reports
    Replies: 7
    Last Post: 07-30-2010, 12:52 PM
  3. Select statement syntax?
    By ksmith in forum Programming
    Replies: 3
    Last Post: 06-24-2010, 09:21 AM
  4. Replies: 1
    Last Post: 05-13-2010, 10:37 AM
  5. What is wrong with my SQL Select statement?
    By John2810 in forum Programming
    Replies: 2
    Last Post: 04-01-2010, 10:30 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