Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BRC - 28 Jun 2007 17:49 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.