Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Sounds like you have Location or Code combobox or textbox bound to lookup table field.



    Make a copy of your db and remove data or dummy it as Welshgasman suggested.
    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.

  2. #17
    Join Date
    Sep 2025
    Location
    Newport, Shropshire, UK
    Posts
    16
    Quote Originally Posted by matey56 View Post
    I think I'm getting close. Now, when I change the location it changes it for all records in the DB. How do I make it so it's only changing it for the current record?
    You should not be storing the code as well as the location in a referencing table, only in the referenced table from which you are selecting a location by means of a combo box. If you were to store the code in the referencing table it would not be functionally determined solely by the primary key of the table, but transitively determined via the location column. The table would thus not be normalized to Third Normal For (3NF) and open to the risk of update anomalies.

    There are a number of ways in which the code can be shown in the form when you select a location. One way is to return the code in a column in the combo box's RowSource query. The following is an example:

    Code:
    SELECT Contacts.ContactID, [LastName] & ", " & [FirstName] AS Customer, 
    Contacts.Address, Cities.City, Regions.Region, Countries.Country 
    FROM Countries INNER JOIN (Regions INNER JOIN (Cities INNER JOIN Contacts 
    ON Cities.CityID = Contacts.CityID) 
    ON Regions.RegionID = Cities.RegionID) 
    ON Countries.CountryID = Regions.CountryID 
    ORDER BY Contacts.LastName, Contacts.FirstName;
    The combo box will show the selected contact by name. Additional text box controls will show the contact's address data by setting their ControlSource properties as follows:

    =[cboCustomer].[Column](2)
    =[cboCustomer].[Column](3)
    =[cboCustomer].[Column](4)
    =[cboCustomer].[Column](4)

    Note that the Column property is zero-based, so Column(2) is the third column, and so on.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need Help With Cascading Combo Boxes
    By emassey0411 in forum Access
    Replies: 14
    Last Post: 05-25-2022, 06:06 PM
  2. Replies: 5
    Last Post: 12-20-2021, 07:50 PM
  3. Replies: 1
    Last Post: 02-27-2014, 03:43 PM
  4. Replies: 6
    Last Post: 02-01-2013, 10:02 AM
  5. Replies: 3
    Last Post: 09-28-2012, 03:05 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