Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call combo box afterupdate event for another form? 1

Status
Not open for further replies.

glgcag

MIS
Apr 25, 2001
160
US
I am trying to refresh information on a different form from a lookup form. I need to call the "different" form's afterupdate event on a particular combo box.

How do I refer to the control on the other form and call it's afterupdate event? (I've tried setting ctl = differentform.control and then coding "Call ctl_afterupdate" but it doesn't work.)

Any help is appreciated!

GLGCAG
 
Try...

Forms!differentform.Control
Or
Forms!differentform.Controls("NameofControl")
 
OK, what I'm doing is this:

Code:
dim ctl as control

set ctl = Forms!fRMProjects.Controls("cmbProject")
Call ctl_AfterUpdate

But I'm getting an error.
 
Modify cmbProject_AfterUpdate to be Public instead of Private and then simply call it:
Call Forms!fRMProjects.cmbProject_AfterUpdate

Note: fRMProjects should obviously be open.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
When I make the AfterUpdate event public and type in:

Call Forms!fRMProjects.cmbProject_AfterUpdate

I get an error that highlights the first ! and says Compile Error: expected . or (
 
And this ?
Call Forms("fRMProjects").cmbProject_AfterUpdate

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It worked! Thanks PHV and rjoubert for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top