OnCurrent

N

nybaseball22

Hello. I am trying to add 2 different functions to an OnCurrent
Command. Is this possible? How would I structure it?

Thank you
 
R

Rick Brandt

Hello. I am trying to add 2 different functions to an OnCurrent
Command. Is this possible? How would I structure it?

Thank you

You can run as many lines of code as you want in one event and you can call as
many other procedures and functions as you want. What is the difficulty you are
having?
 
M

Minton M

You can run as many lines of code as you want in one event and you can call as
many other procedures and functions as you want. What is the difficulty you are
having?

Are you using a macro or a event procedure? My response was the same
as Rick's, but I'm wondering if you're putting the function call
directly in the property box of OnCurrent?
 
N

nybaseball22

The problem is I am not very good with SQL and I received a great deal
of help from several people setting up code to go in the on current
and don't know how to change it to fit into code I already have
there. Can I add a line to my current code in the OnCurrent that will
direct it to a Private Sub?

Thanks
 
M

Minton M

The problem is I am not very good with SQL and I received a great deal
of help from several people setting up code to go in the on current
and don't know how to change it to fit into code I already have
there. Can I add a line to my current code in the OnCurrent that will
direct it to a Private Sub?

Thanks

Yes....if your sub is called My Sub, the line is...

MySub

.... if it's a function, a better way is:

Call MyFunction

To be honest, if you're not familiar with this, make a ton of backups
and experiment on a version that won't be impacted if get lost.
Calling subs/functions is what most subs and functions spend their
lives doing, so practice a little before unleashing the power on a
production db.

Hope this helps,
James
 

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