Results 1 to 4 of 4
  1. #1
    thedavix is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    3

    Linking two combo box in a form

    Good morning



    I have a question regarding how is the best practice to link 2 combo box
    What is following is a simplifed example of my problem

    I have 3 tables
    t_client
    t_Departements
    t_Divisions

    One client contains a name and belongs to a department
    A department contains a name and belongs to a division
    A Division contains just a name

    In my form f_client I have my client Name, my division and my departement.

    What I would like to do is to use the Division first in order to filter out the departments from this division, so what I've putted is a requery of of the departement on my Division_Change() event.
    Till that point everything works.

    But now I have issue when I want to select the values in the department field, I simply can't some time it tells me that my relation of my table is wrong, or sometimes it tells me that I need to save the record first before selecting the value, these two cases depends if I'm in edition or new record mode.

    My goal would be to use this rather simple form in a continuous form.

    I've putted my sample db in attachment, I don't know if somebody could help me here I would really appreciate

    Thank you
    David
    Attached Files Attached Files

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Look at these links. There are two different solutions here. Both will work. One suggests the use of one table while the other suggests the use of multiple tables.

    http://www.access-programmers.co.uk/...d.php?t=223980

    http://www.fontstuff.com/access/acctut10.htm

    Alan

  3. #3
    thedavix is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    3
    Thank you Alan, it helped a lot!
    It's now working in a regular form, in continuous form when I change the the independent combox box value, all the lines are changed :-(

  4. #4
    thedavix is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    3
    I stand corrected, I used the second option and it works for continuous form but I find it very ugly to add the state field in the main table as we already have this relation in the other table...
    Anyway.. I think this is the bad part of working with access...

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

Similar Threads

  1. Replies: 10
    Last Post: 03-04-2012, 12:17 AM
  2. Linking checkbox to combo box
    By greatether in forum Forms
    Replies: 2
    Last Post: 12-19-2011, 12:14 PM
  3. Problems linking form combo box to report
    By novice2011 in forum Queries
    Replies: 3
    Last Post: 09-08-2011, 03:50 PM
  4. Replies: 0
    Last Post: 03-04-2011, 10:28 AM
  5. Open (sub)form linking 2 criteria on current form
    By websterh in forum Programming
    Replies: 2
    Last Post: 02-07-2011, 11:56 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