Hi I have 4 programs for various lotteries, and for the life of me I cannot figure out where I am going wrong with my coding . maybe the logic, maybe the coding , anyways I have source and data files for the Lotto 649 lottery, Lotto Max lottery, and daily Keno both midday and evening , all based in Ontario, Canada. Some of the bugs I can figure out but the one with Lotto Max picking numbers and displaying them should be fairly straight forward. Anyways I have enclosed a zip file with all of the qb64 basic programs and all of the data needed. Thanks a lot guys for any help you can provide. Russ