Forms Error Timer

G

Guest

I need help badly, I cant fiqure out what i am doing wrong with my one form
that when i try to create a swith board, i get a compile error and a
debugging starts:
Private Sub Form_Timer()
Private Sub Form_Timer()
Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM")
End Sub
Private Sub cmdClockStart_Click()
Me.TimerInterval = 1000
End Sub
Private Sub cmdClockEnd_Click()
Me.TimerInterval = 0
End Sub
End Sub
Private Sub Label37_Click()
On my form i have in the properties set on EVENT -TIMER INTERVAL SET AT 0.
Please help since i dont want to delete this db becuase i cant create a
switchboard!
 
E

Ernie

Am I reading this wrong or do you have a private sub
routine inside of a private sub routine, both with the
same name?
Private Sub Form_Timer()
Private Sub Form_Timer()

Can you do that in Access? It wouldn't be legal in any
other language that I've ever worked in.

There should be a line highlighted by the debugger as
being the cause of your compile error, which one is it?
 
G

Guest

Thanks Ernie,

I am new to Access....do i let the debugger run?I thought as soon as i got
the prompt Ambiguous name detected form_timer...i just close it.Could i just
delete the line that looks duplicated in this debugging process?
 
B

Brendan Reynolds

You need to delete the first "Private Sub Form_Timer()" line and also the
last "End Sub" line.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top