To elaborate on Dreamwalker's idea, create a small table with one field...I called my test tblCount and the field EntryCount. Now, I went a different way. I went into the table and set the one record there to 20. I then created a text box on the form that is bound to tblCount.EntryCount (CountrolSource = tblCount![EntryCount]. I set the Enabled property of this box to No. Then, every time the continue button is pressed, but
after you open the main menu, simply do:
Me![EntryCountBox] = Me![EntryCountBox] - 1
By using this method, you check for the box to be zero
before you open the main menu. And you set an OnOpen preperty of the form to check for this box....if 0, then disable the continue button.
One benefit of using the count down like this is you can still display the box (remeber it is disabled!!! no user intervention but it can be seen) and let the user know how many times they have left to enter the program.
Hope I am clear enough. If you need more, please let me know. "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." Albert Einstein.
Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@citi.com