Question about Factoids
I am developing a tabletpc auditing system for a factory environment. I have a good handle on how factoids work, but I have some problems. On some of the audits the user is required to enter a Vin Number - this identifies a part. (I am using the InkEdit textbox in my app btw).
The format for this vin number differs, but it is mostly like these
W3456
X45678
4567890
So as you can see the vin numbers can be in in length from 5 chars to 7 chars - not always but mostly with a capital letter in the front. So my code for the factoid is as follows:
Me.VinNumInspection.Factoid = "(A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z)(0|1|2|3|4|5|6|7|8|9)(0|1|2|" & _
"3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)"
This works well for a 5 char length vin number but thats it. Unless it is perfect, getting a 6 char length or a 7 char length is very hard. Any ideas?
Hi estoniaman,
you can use the or operator "|" to combine the factoids for the 5, 6 and 7 char vin numbers:
"(A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)|(A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)|(A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)"
You also might find this article useful:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dntablet/html/tabpcfap.asp
Thanks - Stefan Wick