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

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
 
B

BRC

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.
 
D

Dennis

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?
 
U

UpRider

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
 
B

BRC

Uprider
Thank you. that worked and does exactly what i was trying to do.
Thanks again, brc
 
F

fredg

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
 

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