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
Dennis - 28 Jun 2007 18:48 GMT
Did you try:
CALL Forms!eventfrm!orderSF!itemnameCB.itemnameCB_AfterUpdate()
???
> I am trying to call the itemnamecb afterupdate event from another open
> form
[quoted text clipped - 6 lines]
> didn't help.
> thanks for any suggestions
BRC - 28 Jun 2007 19:02 GMT
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.
Dennis - 28 Jun 2007 21:02 GMT
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?
> 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.
UpRider - 28 Jun 2007 22:39 GMT
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
[quoted text clipped - 6 lines]
> didn't help.
> thanks for any suggestions
BRC - 28 Jun 2007 23:17 GMT
Uprider
Thank you. that worked and does exactly what i was trying to do.
Thanks again, brc
fredg - 28 Jun 2007 23:19 GMT
> I am trying to call the itemnamecb afterupdate event from another open
> form
[quoted text clipped - 6 lines]
> didn't help.
> thanks for any suggestions
Call Forms("eventfrm").itemnameCB_AfterUpdate()
Both forms must be open.
The itemnameCB_AfterUpdate() must be declared Public

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail