View Full Version : Using LIKE in an IF statement


GodsChild
11-29-2001, 08:51 AM
I dont know if this is possible but I want to compare two texts fields, txtMajor and Majorname. txtMajor has a single major in it, while MajorName has multiple majors in it. I want the user the to be able to perform the operation if their major (txtMajor) is in the list of majors (MajorName). A SQL statement wont do what I need to do. I want something like:
If txtMajor = MajorNAME then.... But with this statement it doesnt read all the majors in Major name. Any help would be wondeful!! Thanks!

Jack Cowley
11-29-2001, 10:23 AM
With code you can take apart the MajorName field and do comparisons, but you would be much better off if MajorNames were in individual records. You should consider revamping this part of your database as this setup will continue to give you problems until you change it.