Validation Rules

  • Thread starter Thread starter Steve Kipping
  • Start date Start date
S

Steve Kipping

Guest
I have a database that tracks real estate data. I have two fields [list_company] and [sale_company]. One of these fields must have our office name (LTC) in it (they both can have LTC). I want to validate (if that's the word) that I have enterd LTC in at least one of the fields. Any suggestions?

Thanks,
SKK
 
On the Before Update event of the form, place code to check whether LTC is in either of the two fields:


If me.[list_company] <> "LTC" and me.[sale_company]<> "LTC" then
msgbox "LTC must be either the listing or sales agent."...
cancel = true
exit sub

else
' do nothing, continue updating the record

end if

HTH
Elana
 

Users who are viewing this thread

Back
Top Bottom