Event Procedure

  • Thread starter killeronloose via AccessMonster.com
  • Start date
K

killeronloose via AccessMonster.com

Hi,

I am looking to insert [Event Procedure] for a form's event through VBA.

Ideas on how it should be done welcome and appreciated.

Thanks.
 
C

ChrisO

To answer the direct question and using the example in the link to Microsoft
by Stefan: -

Me.Command1.OnClick = "[Event Procedure]"

That can be done at runtime even in an MDE file.

Please be aware that the code, in that link, will only work in an MDB file
where the Form can be opened in design view.

--
A nod is as good as a wink to a blind horse.


killeronloose via AccessMonster.com said:
Thanks a lot. Got leads to what I wanted to achieve.

Stefan said:
hi,
I am looking to insert [Event Procedure] for a form's event through VBA.
What do you like to do? You're probably looking of

http://msdn.microsoft.com/en-us/library/aa443944(VS.60).aspx

mfG
--> stefan <--

--



.
 
S

Stefan Hoffmann

hi Chris,

To answer the direct question and using the example in the link to Microsoft
by Stefan: -

Me.Command1.OnClick = "[Event Procedure]"
This will not "insert" an event procedure. It will only link to an
existing one. This is a big difference, hence my question.


mfG
--> stefan <--
 
C

ChrisO

Yes I’m aware of the difference but the original question was >> I am looking
to insert [Event Procedure] for a form's event through VBA.

The original question was not; I am looking to insert an Event Procedure for
a form's event through VBA.

In any case, I have seen a few people do this and then ask the question; why
doesn’t it work in an MDE file. A lot of work wasted by not considering the
final requirement and that requirement was not mentioned directly in the
Microsoft article.

So I mentioned it just in case the original poster had not considered that
point.

--
A nod is as good as a wink to a blind horse.


Stefan Hoffmann said:
hi Chris,

To answer the direct question and using the example in the link to Microsoft
by Stefan: -

Me.Command1.OnClick = "[Event Procedure]"
This will not "insert" an event procedure. It will only link to an
existing one. This is a big difference, hence my question.


mfG
--> stefan <--
.
 

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