Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

adding event procedure dinamicly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roy Goldhammer - 21 Jun 2007 14:29 GMT
Hello there

I need to replace the event procedure of control in runtime and send byref
currentForm

I tried to make something like this:

ctl.AfterUpdate = "=myFunction([Me])
and it brought me an error:
The expression after update you entered as the event property setting
produced the following error: The object dosn't contain the automation
object 'me.'

is there a way to send current form i'm working with to function:
Stefan Hoffmann - 21 Jun 2007 15:00 GMT
hi Roy,

> ctl.AfterUpdate = "=myFunction([Me])
> and it brought me an error:
> The expression after update you entered as the event property setting
> produced the following error: The object dosn't contain the automation
> object 'me.'
> is there a way to send current form i'm working with to function:
You have to assign the same string as in the property editor:

  ctl.AfterUpdate = "=myFunction([Form])"

mfG
--> stefan <--
Klatuu - 21 Jun 2007 15:53 GMT
Just remove the brackets from Me.  Here is an example from one of my apps:

Sub SetNavButtons(ByRef frmSomeForm As Form)

called like this:

Private Sub Form_Current()
   Call SetNavButtons(Me)
End Sub

Signature

Dave Hargis, Microsoft Access MVP

> Hello there
>
[quoted text clipped - 10 lines]
>
> is there a way to send current form i'm working with to function:
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.