Trying to learn access, I played with a simple access app. An initial form is displayed, and the user can select an operation to be performed.
Let's say I want info on a customer. Another form is opened, the user enters the name, the related info are displayed, and when the user is done, he can press enter (and the form is redisplayed empty, ready for next name) or he can opt for exiting pressing the button EXIT (and the initial form is redisplayed). This works fine.
I tried to add a simple clock on the initial form. So, following suggestions found online, I defined a label called Clock, set the form timer to 1000, and added the code for the timer event
Now, when I open the initial form, the clock is displayed and updated every second, as it should. Fine? No. What happens is the following. The user opens the info form, enters a name and the related info are displayed. Now he presses enter, and the form is NOT cleared; if he presses EXIT, the initial form is NOT displayed (blank screen)Code:Private sub form_timer() me.Clock.caption = time end sub
It is clear that the timer event code is causing this (removing it brings things to normal again), but why? Is there something else that must be taken care of?
Thank you for your patience... with a rookie.