Adding a button to a form - by coding it

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I have successfully created a set of Command Button controls on a form
through some code, but am now faced with an unexpected problem.

How do I create the "Click Event" for those buttons?

If I create a CommandButton using the control tool box, then its easy. I
just "Build Event" and place my code under the click event. But I can't work
out how to do the same if the command button was created on the fly, through
code.

Any suggestions?
Thanks
Michael
 
Any chance you tried help?

Everything you need is in the topic for the "CreateEventProc Method."

If you had simply searched for; How do I create the "Click Event", your
exact question below, your answer is the number one hit.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Useful Metric Conversion #17 of 19: 1 billion billion picolos = 1 gigolo
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
thanks

M.L. Sco Scofield said:
Any chance you tried help?

Everything you need is in the topic for the "CreateEventProc Method."

If you had simply searched for; How do I create the "Click Event", your
exact question below, your answer is the number one hit.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Useful Metric Conversion #17 of 19: 1 billion billion picolos = 1 gigolo
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
You're welcome.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Useful Metric Conversion #17 of 19: 1 billion billion picolos = 1 gigolo
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 

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

Back
Top