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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call A Procedure From Another Form 2

Status
Not open for further replies.

rookery

Programmer
Apr 4, 2002
384
GB
This is my situation:

I have a Pop-Up Form open on top of the main Clients Form. I want to push a button on the pop-up, which closes it and calls a procedure on the Clients Main Form. I've declared the procedure Public Sub in the Clients Main Form code and have included the following line in the Unload event of the pop-up:

Call Forms!Clients!cmdCancel1_Click

Why isnt this working? I keep getting a compile error highlighting the '!' character after 'Forms'. Have tried changing it but still no joy.
 
This is one of this maddening occasions where the Bang Dot rules break down.

What you need is
Call Forms.Clients.cmdCancel1_Click


Replace Bangs with Dots.


'ope-that-'elps




G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Simple when you know how! Cheers Smudge.
 
Assuming you always want to call that function when the popup is finished and assuming it is open in dialog mode, why not put the function call in your mainform right after the DoCmd.OpenForm etc code? Seems like that would be simpler.

Good Luck!
Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need![thumbsup]
 
Thats the probelem with assumptions Buckeye - I dont want to call that procedure every time I shut down the pop-up. Cheers anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top