Created function to determine relationships between forms