Results 1 to 3 of 3
  1. #1
    nbdwt73 is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2009
    Location
    Charlotte NC
    Posts
    8

    Combo Box Row source problem

    I have an order entry system written in Access with several tables used for customer information, product info, order status, etc. Recently we added a new table for multiple customer email addresses (original setup allowed for one email address per customer and that field was in the customer table). The new table is setup as a one-to-many type relationship:
    · Customer1 – email1
    · Customer1 – email2
    · Customer1 – email3
    · Customer2 – email1
    · Customer2 – email2
    · ETC



    We added a new combo box field on the main form with a row source defined:

    Click image for larger version. 

Name:	Combo Box.jpg 
Views:	15 
Size:	92.3 KB 
ID:	15303


    The control source (FullName) is the field in the orders table containing the email address for that specific order. The select statement uses a field from the main customer order form as the key for the query into the new email table.

    This works for the first new order entered into the system after the initial form start (or restart) however for all subsequent orders the field contains the email addresses from the first order. It is as if the query maintains the results from the first entry throughout the session. If we close the screen and re-open the order screen it will work fine once…

    I have tried every permutation of query I can think of with the same results… What am I doing wrong?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    This is a dependent combobox. It must be requeried after moving to another record or after selecting customer. The trick is figuring out which event to use. Try the combobox GotFocus.

    Me.comboboxname.Requery
    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.

  3. #3
    nbdwt73 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Nov 2009
    Location
    Charlotte NC
    Posts
    8
    Thank you June7 - This fixed my problem and I learned something new. Always a good ending.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-28-2013, 10:03 PM
  2. Replies: 11
    Last Post: 08-08-2013, 03:31 PM
  3. row source for a combo box
    By crowegreg in forum Forms
    Replies: 1
    Last Post: 02-05-2013, 05:18 PM
  4. Replies: 3
    Last Post: 12-11-2012, 09:12 AM
  5. Replies: 1
    Last Post: 03-01-2011, 03: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