OnCurrent

  • Thread starter Thread starter nybaseball22
  • Start date Start date
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
 
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?
 
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?
 
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
 
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
 
Back
Top