Results 1 to 5 of 5
  1. #1
    richardm55 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2014
    Location
    Birmingham, UK
    Posts
    20

    Problem with combo control

    I've created simple base with 2 table related each other. Then I've built query with the fields taken from both tables and finally I've made the form with some combo controls.
    There are 2 tables:
    • Table articles with following fields:


    • ID (main key), article
    • Article name
    • Article type
    • First page
    • Last page


    • Description
    • ID magazine
    • Table magazines with following fields:
      • ID magazine
      • Magazine name
      • Magazine year
      • Magazine month


    Both table are related through key ID magazine
    I made combo controls for field:
    • Magazine name
    • Magazine year
    • Magazine month

    I've created some records for table magazines for diffirent magazine names and various years and months asigning their main key as number (not autonumber, otherwise table will created the same records for the same value of 3 fields: magazine name, magazine year and magazine month.

    I have problem when I start using the form. When I select values in 3 combo controls (taken from coresponding fields from table): magazine name, magazine year and magazine month, ID magazine is not selected at all!!!!! and I don't know why.

    That's shame nobody is not able to give me any clue, yet but I will be patient to get proper solution.
    Last edited by richardm55; 07-05-2015 at 02:21 PM.

  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,870

  3. #3
    richardm55 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2014
    Location
    Birmingham, UK
    Posts
    20
    I think I have found myself the solution and my data base works like I wanted. Here is link into another forum where I've described it with details Here is link http://www.access-programmers.co.uk/...31#post1438531

    I still have a little problem. As data source for combo box controls I take records from some fields of Magazine table, Magazine Name, Magazine Year and Magazine Month and those combo boxes unfortunately display couples the same values. So my question is how to write rule in query used for combo boxes to list uniques values only without repetitions?

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I'm a little fuzzy, vis-à-vis exactly what you want to be unique, whether a single Field or an entire Record, but you can modify the SQL Statement for the RowSource for the Combobox to work either way.

    (Directly from Access Help)

    DISTINCT

    For eliminating duplicates of specific Fields: Omits records that contain duplicate data in the selected fields. To be included in the results of the query, the values for each field listed in the SELECT statement must be unique. For example, several employees listed in an Employees table may have the same last name. If two records contain Smith in the LastName field, the following SQL statement returns only one record that contains Smith:

    SELECT DISTINCT
    LastName
    FROM Employees;


    DISTINCTROW

    For eliminating duplicates of entire Records: Omits data based on entire duplicate records, not just duplicate fields. For example, you could create a query that joins the Customers and Orders tables on the CustomerID field. The Customers table contains no duplicate CustomerID fields, but the Orders table does because each customer can have many orders. The following SQL statement shows how you can use DISTINCTROW to produce a list of companies that have at least one order but without any details about those orders:

    SELECT DISTINCTROW CompanyName
    FROM Customers INNER JOIN Orders
    ON Customers.CustomerID = Orders.CustomerID
    ORDER BY CompanyName


    Linq ;0)>

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Reference Control on Subform Problem
    By McArthurGDM in forum Queries
    Replies: 1
    Last Post: 02-11-2015, 04:38 PM
  2. Text control to act like combo control
    By chris.williams in forum Programming
    Replies: 2
    Last Post: 11-11-2011, 10:12 PM
  3. Barcode control problem
    By ckleung in forum Database Design
    Replies: 0
    Last Post: 07-26-2011, 10:56 PM
  4. Web Browser Control Problem
    By ctgann in forum Forms
    Replies: 0
    Last Post: 03-06-2011, 06:09 AM
  5. Tab control problem
    By Jackie in forum Forms
    Replies: 3
    Last Post: 03-01-2011, 11:59 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