(Running Access365)
As I am trying to learn VBA I am experimenting with the On Event feature of some of my forms. Just something simple so I can understand what is happening and when. Just a simple place to start.
I tried to set it up so that when the cursor left one field the program would beep. So I tried to put the code in the Before Update event.
I found this code on a Microsoft site:
Dim I
For I = 1 To 3 ' Loop 3 times.
Beep ' Sound a tone.
Next I
And it did not work.
So I tried running the code in the VBA editor Immediate window and I received a "Compile Error: Next without For" pop-up.
If I can not even get Microsoft Provided code to work what the heck am I supposed to do?
As I am trying to learn VBA I am experimenting with the On Event feature of some of my forms. Just something simple so I can understand what is happening and when. Just a simple place to start.
I tried to set it up so that when the cursor left one field the program would beep. So I tried to put the code in the Before Update event.
I found this code on a Microsoft site:
Dim I
For I = 1 To 3 ' Loop 3 times.
Beep ' Sound a tone.
Next I
And it did not work.
So I tried running the code in the VBA editor Immediate window and I received a "Compile Error: Next without For" pop-up.
If I can not even get Microsoft Provided code to work what the heck am I supposed to do?