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    
post Feb 14 2018, 07:13 PM

Posts: 277
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
post Feb 14 2018, 07:18 PM

UA Admin
Posts: 34,587
Joined: 20-June 02
From: Newcastle, WA

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

UtterAccess Editor
Posts: 16,317
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()
Public Sub cmdClose_Click()

Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    23rd February 2019 - 07:48 AM