Open the form in design view.
In the menu bar at the top of the screen "File Edit View Insert etc", click on view. You should see "Code" in the option list.
Click on "Code". This will open up the form module. Scroll to the very top of the module. Right at the top you will see a line of code that reads "Option Compare Database".
Right under this is where you will declare the two variables. Paste in the two lines right below the line that reads "Option Compare Database".
This is what you should end up with right at the top of the module (a module is where you enter code that will run when form or control events happen).
Option Compare Database
Private strOnOff As String
Private intCount As Integer
Now that the two variables have been declared. They need to be initialized (or given a starting value). This should be done when the form opens ( in the form "Open" event).
Again, right at the top of the module, just above where the code starts, there are 2 selection drop down boxes. Click on the drop down on the box on the left and select "Form". Now click on the drop down box on the right and select "Open" from the list. As soon as you select "Open", your cursor will be in the code area of the form open event.
Right above the cursor, you will see this line of code - "Private Sub Form_Open(Cancel As Integer)". A little below it and you will see this lne of code "End Sub". Between these 2 lines see where you paste in the code to initialize the variables.
strOnOff = "ON"
intCount = 0
In my first reply, did you understand where to put the code for the form "On Timer" event and the form "On Close" event? Did you also understand how to set the form "Timer Interval" property?
If you get everything in the right place it will work fine.