Here are a few other things:
1) It will be annoying to the user of your program to correct one error and then find out he/she has a second, third and fourth error. You should probably check for all invalid conditions and then create one message that will list everything that is wrong. You can also do such things as changing label caption (or other things) forcolors to red when a particular item is in error to help the user locate it.
2) While it won't hurt anything you don't need to both Load and Show a form. As soon as you Show it, it will automatically be loaded.
3) You also don't need to both Hide and Unload a form. Either one will remove it from view. Use Hide when you want to be able to quickly redisplay it, and Unload when it won't be needed again.
4) You need an Exit Sub between Set db = OpenDatabase("", False, False, X)anddberror. Otherwise the code will "fall through" to and execute the error code even when the db call is OK.



------------------
Marty