MarieLine77
Registered User.
- Local time
- Today, 17:10
- Joined
- Apr 4, 2012
- Messages
- 55
OK, I took a look at your app. Right away I had to correct the spelling of your query and form names in the code form this;
Code:Private Sub Form_Load() If DCount("*", "qSupervisionsReminder") > 0 Then DoCmd.OpenForm "frmqSupervisionsReminder" End If End Sub
to this;
Code:Private Sub Form_Load() If DCount("*", "qSupervisions") > 0 Then DoCmd.OpenForm "frmqSupervisions" End If End Sub
I realize that this is probably just from you trying to get the code to work, but just make sure it's corrected on your end so that it is referencing the actual query and form names.
Having said that, you should have been getting an error message. You didn't mention anything about that, so my guess is that your code is not running at all because your database is not in a trusted location. In A2007 and later, code will not run if the application is not in a trusted location. You can add your database folder to the list of trusted locations, in Access 2010, by going to the File tab / Options / Trust Center / Trust Center Settings / Trusted Locations. In Access 2007 it will be something similar but your will get there through the "Office" button in the upper left instead of the File tab.
Once you have that solved the code should work provided that you corrected the query and form names. Keep in mind that since you are using tabbed forms, the frmqSupervisions form will not pop up right in front of you. It will open on another tab and you may need to click the tab to see it. If you want it to pop up in front of the user, you can open it in Dialog mode by modifying your code as follows;
Code:Private Sub Form_Load() If DCount("*", "qSupervisions") > 0 Then DoCmd.OpenForm "frmqSupervisions", , , , , acDialog End If End Sub
Thank you so much Beetle everything is working fine now..
I just need to play around with my options a little more and decide which "reminder" type to go for now so I thank you kindly for showing me how to set a reminder in two different ways

In the end the problem wasn't my spelling as I had already tried the correct spelling as stated in #17 above. I never received an error message otherwise I would have mentioned it. All I can think of is that the problem was the trusted location which I have now created on my hard drive

Thanks a million to everyone who helped me...
