Hello again. I am getting an error on the open of my database and I cant figure out why. The error is: "The expression OnOpen you entered as the event property setting has produced the following error: Return without Go Sub." Now I have narrowed the problem down to the open of my startup form. If I hold shift and open my database, I do not get the error, but when I try to open the startup form manually I get the same error. Now here is the kicker... I have not changed anything in the OnOpen event of the form since it last worked correctly. To make it even more strange, if I open the form in design view, then go to the onOpen event in the properties panel and open VBA editor from there, and not even edit anything, but just open VBA, then go back to access and switch to form view, it opens just fine. When I close the form it asks if I want to save the changes, which is strange because I did not change a thing, and regardless if I click yes or no, the form opens just fine for the rest of the database session. But upon close and reopen of the database, I get the same error again.
Well, after writing this but before posting I tried something and I think I fixed it, but rather then just delete what I worte I thought I'd post anyway to see if anyone knows what caused the problem. What I did to fix it was comment out the whole onOpen procedure of the form, save and close the form and database, reopen the database, uncomment the onOpen procedure, save and close everything again, then reopen again and everything is now fine.
Problem solved, but does anyone know why it was acting like it was? i did do a compact and repair, but that did not fix it before.
Well, after writing this but before posting I tried something and I think I fixed it, but rather then just delete what I worte I thought I'd post anyway to see if anyone knows what caused the problem. What I did to fix it was comment out the whole onOpen procedure of the form, save and close the form and database, reopen the database, uncomment the onOpen procedure, save and close everything again, then reopen again and everything is now fine.
Problem solved, but does anyone know why it was acting like it was? i did do a compact and repair, but that did not fix it before.