can some tell me what's wrong with this code?

  • Thread starter Thread starter BRC
  • Start date Start date
B

BRC

I am trying to call the itemnamecb afterupdate event from another open
form
I have made that event public
the contol name is itemnameCb.
using access 2003

Forms!eventfrm!orderSF!itemnameCB.itemnameCB_AfterUpdate()
this turns red and says it expected "=". tried removing () but that
didn't help.
thanks for any suggestions
 
Thank you,
Yes i did try that. When i do, the entire statement turns red, the
first "!" is selected and a dialog opens saying
Compile error:
"expected: . or ( . "
I tried replacing ! (s) with periods but that generates other errors.
 
What are you trying to do excatly, that you need to call the afterUpdate
routine in the other form? Why don't you create a PUBLIC sub and call it
instead?
 
Too much information for Access.
Try

Call form_orderSF.itemnameCB_AfterUpdate()

Yes, it's an underscore, not dot or pop. You don't need to qualify it with
the main form.

UpRider
 
I am trying to call the itemnamecb afterupdate event from another open
form
I have made that event public
the contol name is itemnameCb.
using access 2003

Forms!eventfrm!orderSF!itemnameCB.itemnameCB_AfterUpdate()
this turns red and says it expected "=". tried removing () but that
didn't help.
thanks for any suggestions

Call Forms("eventfrm").itemnameCB_AfterUpdate()

Both forms must be open.
The itemnameCB_AfterUpdate() must be declared Public
 
Back
Top