February 4, 200817 yr I'm sure there is a very simple way to execute this bt I am just having a brain fart. I have a database that keeps customer records including credit cards. When I type in a CC number I would like to have a field automatically tell me what type of CC it is, for example if the number starts with 6 it is discover etc. etc. Can anyone help? As of right now I have some very convaluted calculation that works intermittently and is not really 100% accurate -) Thanks
February 4, 200817 yr What cards do you accept? For Visa, MC, Amex, and Discover... Let([ init1 = Left(CC;1); init2 = Left(CC;2); init4 = Left(CC;4)]; Case( init2 = "34" or init2 = "37"; "American Express" ; init4 = "65" or init4 = "6011"; "Discover Card"; init2 = "51" or init2 = "52" or init2 = "53" or init2 = "54" or init2 = "55"; "MasterCard"; init1 = "5" ; "Visa"; "Error") )
February 5, 200817 yr Author Thank you. I tried it, but am having some difficulties, first of all I'm self taught and I'm not well versed on the functions so I'm having a hard time troubleshooting. I understand the LET command, I replaced CC with my CC number field name, but I don't understand "init" if you have time, I could really use a little help in getting this to work.
February 5, 200817 yr Author OK, I'm an idiot, I managed to figure it out I just needed to pay attention - thanks for your help, it works perfectly :blond:
Create an account or sign in to comment