Symptom:

- You cannot add or change a record because a related record is required in "Valves" table

- Runtime error shows up clicking IMPORT in the Data Import window.

Possible Causes: 

  1. Handheld controller related:
    1. Corrupted saved activity in handheld controller
      1. Open the activities.txt file from the Vitals Mobile\Data folder in the handheld controller and delete the activities that have the .trq extension missing. 
    2. ~missing at the end of some activities. Adding ~ to some of the activities might fix the issue. 
      1. Sometimes if there is no ~ the program expects the Valve record to preexist in the Desktop database, and if it is not there for whatever reason, it will trigger the runtime message. Adding the ~ in the activities.txt file will treat the activity as a new activity with a NEW valveID.