UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Calling A Procedure In Another Form, Access 2013    
 
   
SomekindaVB
post Feb 14 2018, 07:13 PM
Post#1



Posts: 274
Joined: 15-December 16



Hi all,

I am trying to call a procedure in another form

I know the convention is Forms!MyFormName.Procedure

How, my form name is full of spaces Forms![My Form Name].Procedure

And I keep hitting a compile error: Expected. or (

So what's the secret?



Go to the top of the page
 
GroverParkGeorge
post Feb 14 2018, 07:18 PM
Post#2


UA Admin
Posts: 33,945
Joined: 20-June 02
From: Newcastle, WA


Try: Forms("My Form Name").Procedure
Go to the top of the page
 
LPurvis
post Feb 15 2018, 04:05 AM
Post#3


UtterAccess Editor
Posts: 16,291
Joined: 27-June 06
From: England (North East / South Yorks)


Also, just to mention, you'll need the procedure to be public of course.
So any automatically created Event Procedures won't be exposed. But you can change them to being public easily enough.
For example:
Private Sub cmdClose_Click()
becomes
Public Sub cmdClose_Click()

Cheers
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    17th November 2018 - 03:44 AM