Results 1 to 3 of 3
  1. #1
    Yogibear is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2012
    Posts
    18

    editing lookup table, automatically update mother table?

    My tblEmp has a lookup to tblCareerType. The tbleCareerType has to be edited. For instance, a record in tblCareerType is "faculty research" must be changed to "faculty - research." (I have no comment on that )

    I thought once the lookup table was edited, the main table would refresh. It doesn't......what am I missing aside from half my brain?

    In true panic rush mode I did a find and replace in tblEmp for the changes that needed to be made. I then made the edits on the tblCareerType ensuring they match exactly.



    This is not how I want to operate -- but is that just how it is?

    Please. Help. THANK YOU!!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    It could be the EMP tbl is storing the text from the lookup table and NOT referencing the table.
    if this is so, once your changes are made to the lookup tbl, you must run an update to EMP to the new values.

    if the EMP table had linked to the lookup tbl, the changes would be immediate.

  3. #3
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    There are two solutions:

    1. Add an autonumber primary key to your tblCareerType and modify the tables that reference that table to use a long family key and update with the newly generated autonumbers - that would the 'normal' structure.

    2. Having said that your design is OK for limited number of career types, but will cause database bloat because you are storing multiple text values of perhaps 20 or 30 bytes against the 4 bytes of a long. But to fix it, you need to go into tblCareerType and set the careertype name as a primary key if not already done. Then go into relationships and set a one to many relationship between tblCareerTypes and tblEmp, plus any other tables that use the career type. Double clicking on the relationship line opens up a small form - tick 'enforce referential integrity' and 'Cascade Update Related Fields'. I do not recommend you tick the 'cascade delete' option - if you delete a type, all records in tblEmp which use that type will also be deleted, and I'm sure you wouldn't want that!

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

Similar Threads

  1. Update table from query automatically
    By charly.csh in forum Queries
    Replies: 12
    Last Post: 11-19-2014, 02:57 PM
  2. Replies: 1
    Last Post: 11-15-2013, 11:42 PM
  3. update query using a lookup table
    By slimjen in forum Queries
    Replies: 2
    Last Post: 04-27-2012, 03:46 PM
  4. Replies: 5
    Last Post: 08-20-2010, 06:40 AM
  5. Replies: 1
    Last Post: 05-17-2010, 12:03 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