Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.50 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Access table validation using data from other tables/queries
  2. ALTER TABLE current_goals
  3. ADD CONSTRAINT valid_goal
  4. CHECK (
  5.     goal >= (
  6.             SELECT goal_floor
  7.             FROM min_goals
  8.             WHERE min_goals.category_id = current_goals.category_id
  9.             )
  10.       );
  11.        
  12. CurrentProject.Connection.Execute strDdl
  13.        
  14. If CategoryGoalValue == DLookup('MinGoal', 'Goal', 'Goal = ''' & CategoryName & '''') Then    
  15.   'Minimum Goal Met    
  16. Else    
  17.   'Warning - Minimum Goal Not Met    
  18. End If