Button event firing twice when using =Event

  • Thread starter Thread starter Andrew Backer
  • Start date Start date
A

Andrew Backer

Having an odd little problem with one of my forms.

I have a button on my form, which is in 'repeating form' mode. When I
use an event procedure for the 'onclick' it fires once. If I use the
syntax "=SomeFunc()" it fires twice.

Created another test form and did the same thing, but it fires once and
then crashes with the standard 'error in macro or something else' message.

Any clues?

- Andrew Backer
 
Fixed it! I should post more often; every time I do I find that I
figure out what the problem is.

I had declared the routine as a 'sub'. I change it to 'function' and
everything works fine.

Now I can put "=MyFunc([MyId]) on my button w/ no worries.

Kinda irritating, but I suppose there must be some reason. Maybe the
caller expectes some sort of return value, even though I don't return
anything from the function.
 
Back
Top