Results 1 to 14 of 14
  1. #1
    umdengineeringstudent is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Posts
    7

    Exclamation Linking columns

    I need to link two columns together from different tables. the columns do not have the same name and also different data. But I need the column named Urgency in tblHISTORY to tell Column Open_Work_Order in tblSign to be yes only if SignID is in both tables and Column Urgency is High,Medium,or Low. But say no if column Urgency say Completed. Is this Possible? If so how do you do it.



    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What is table relationship? Is SignID a PK/FK? Build a query that joins these tables on PK/FK fields. Construct a field in the query that does calculation for the Yes/No output. There is no need for the Urgency field in table - this Yes/No output can be calculated when needed.
    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
    umdengineeringstudent is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Posts
    7
    what is PK/FK

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Primary Key / Foreign Key
    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.

  5. #5
    umdengineeringstudent is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Posts
    7
    the only relationship is the signID. SignID is a unique number assigned by me. it is not a pk/fk in either table.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Your info is contradictory.

    You said the calculation is dependent on whether SignID is found in other table. This implies a relationship that uses the SignID as a key link.

    If SignID is not a key value then the tables have no relationship and why would it matter if same SignID value is in other table?
    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.

  7. #7
    umdengineeringstudent is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Posts
    7
    It is a key link now. But wasn't in the past. in the past the two tables didn't share the information. The sign ID was inserted into them by the user. so they have the same ID in them. in the case of tblHISTORY the sign id may be used multiple times.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Then it should be designated a primary key in tblSign. Now build query.
    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.

  9. #9
    umdengineeringstudent is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Posts
    7
    I tried setting it as the primary key and this error comes upClick image for larger version. 

Name:	error.png 
Views:	8 
Size:	33.6 KB 
ID:	23004

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Then SignID is not unique in tblSign. There are duplicate values. Your data is messed up.
    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.

  11. #11
    umdengineeringstudent is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Posts
    7
    there is a query that forms a relationship between the two that I over looked. Is there anyway of doing what I am looking for with this query?

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not unless you fix the data in tblSign so SignID is unique.
    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.

  13. #13
    umdengineeringstudent is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2015
    Posts
    7
    Okay, so once I fix it and make the all unique. what is the process?

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Set the SignID field as primary key.

    See post 2 - build query, do calc in query. This is basic Access functionality. https://support.office.com/en-ca/art...4-5ee8e1c29dc7
    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. Linking columns in two different tables
    By bradp1979 in forum Access
    Replies: 11
    Last Post: 09-29-2015, 04:37 PM
  2. Replies: 4
    Last Post: 07-08-2014, 08:59 AM
  3. Linking columns to ID number in multiple tables
    By oakeoffice in forum Access
    Replies: 8
    Last Post: 11-08-2012, 07:10 PM
  4. Linking columns in access to a particular column.
    By israellawndale in forum Access
    Replies: 4
    Last Post: 08-16-2011, 02:55 PM
  5. Replies: 0
    Last Post: 03-04-2011, 10:28 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